@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

/*---------- ROOT VARIABLES ----------*/

:root {
    --color-primary: #7380ec;
    --color-danger: #ff7782;
    --color-success: #0cf3c1;
    --color-warning: #ffbb55;
    --color-white: #fff;
    --color-info-dark: #7d8da1;
    --color-dark: #363949;
    --color-light: rgba(132, 139, 200, 0.18);
    --color-primary-variant: #111e88;
    --color-dark-variant: #677483;
    --color-background: #f6f6f9;

    --card-border-radius: 2rem;
    --border-radius-1: 0.4rem;
    --border-radius-2: 0.8rem;
    --border-radius-3: 1.2rem;

    --card-padding: 1.8rem;
    --padding-1: 1.2rem;

    --box-shadow: 0 2rem 3rem var(--color-light);
}


* {
    margin: 0;
    padding: 0;
    outline: 0;
    appearance: none;
    border: 0;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box;
}

input[type="checkbox"],
input[type="radio"] {
  appearance: auto;
  -webkit-appearance: auto;
}

html {
    font-size: 14px;
    font-size: var(--base-font-size, 15px);
}

body {
    width: 100vw;
    height: 100vh;
    font-family: poppins, sans-serif;
    font-size: 0.88rem;
    background: var(--color-background);
    user-select: none;
    overflow-x: hidden;
    color: var(--color-dark);

}

.container {
    display: grid;
    width: 96%;
    margin: 0 auto;
    gap: 1.8rem;
    grid-template-columns: 14rem auto 20rem;
}

a {
    color: var(--color-dark);
}

img {
    display: block;
    width: 100%;
}

h1 {
    font-weight: 800;
    font-size: 1.8rem;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 0.87rem;
}

h4 {
    font-size: 0.8rem;
}

h5 {
    font-size: 0.77rem;
}

small {
    font-size: 0.75rem;
}

.profile-photo {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    overflow: hidden;
}
.text-muted {
    color: var(--color-info-dark);
}

p {
    color: var(--color-dark-variant);
}

b {
    color: var(--color-dark);
}

.primary {
    color: var(--color-primary);
}
.danger {
    color: var(--color-danger);
}

.success {
    color: var(--color-success);
}

.warning {
    color: var(--color-warning);
}

aside {
    height: 100vh;
}

aside .top {
    display: flex; 
    align-items: center;
    justify-content: space-between;
    margin-top: 1.4rem;
}

aside .logo {
    display: flex;
    gap: 0.8rem;  
}

aside .logo img {
    width: 2rem;
    height: 2rem;
}

aside .close {
    display: none;
}

/* ======= SIDEBAR ================= */
aside .sidebar {
    background: white ;
    display: flex;
    flex-direction: column;
    height: 86vh;
    position: relative;
    top: 3rem;
}

aside h3 {
    font-weight: 500;
}

aside .sidebar a {
    display: flex;
    color: var(--color-info-dark);
    margin-left: 2rem;
    gap: 1rem;
    align-items: center;
    position: relative;
    height: 3.7rem;
    transition: all 300ms ease;
}

aside .sidebar a span {
    font-size: 1.6rem;
    transition: all 300ms ease;
}


aside .sidebar a:last-child {
 margin-top: auto;
 margin-bottom: 2rem; /* keeps spacing at the bottom */
}

aside .sidebar a.active {
  background: var(--color-light);
  color: var(--color-primary);
  margin-left: 0;
}
aside .sidebar a.active::before{
  content: '';
  width: 6px;
  height: 100%;
  background: var(--color-primary);
}
aside .sidebar a.active span{
  color: var(--color-primary);
  margin-left: calc(1rem - 3px);
}
aside .sidebar a:hover{
    color: var(--color-primary);

}
aside .sidebar a:hover span{
  margin-left: 1rem;
}
aside .sidebar .message-count {
  background-color: var(--color-danger);
  color: var(--color-white);
  padding: 2px 10px;
  font-size: 11px;
  border-radius: var(--border-radius-1);
}
 
/*----------------------MAIN ----------------------------*/

main{
  margin-top: 1.4rem;

}
main .date{
  display: inline-block;
  background: var(--color-light);
  border-radius: var(--border-radius-1);
  margin-top: 1rem;
  padding: 0.5rem 1.6rem;
}

main .date input[type='date']{
 background: transparent;
 color: var(--color-dark);
}

main .insights{
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 1.6rem;
 margin-top: 1rem;
}

main .insights > div{
  background: var(--color-white);
  padding: var(--card-padding);
  border-radius: var(--card-border-radius);
  box-shadow: var(--box-shadow);
  transition: all 300ms ease;
}
main .insights > div:hover{
  box-shadow: none;
}








/* ===== CLIENTS SECTION ===== */
#clients-section {
    background: var(--color-white);
    padding: var(--card-padding);
    border-radius: var(--card-border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.add-client-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-1);
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-primary:hover {
    opacity: 0.8;
}

.clients-table table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.clients-table th, .clients-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--color-light);
}

.clients-table th {
    color: var(--color-dark);
}

.clients-table td {
    color: var(--color-dark-variant);
}

.view-btn, .delete-btn {
    border: none;
    border-radius: var(--border-radius-1);
    padding: 0.1rem 0.2rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.view-btn {
    background-color: var(--color-success);
    color: white;
}

.delete-btn {
    background-color: var(--color-danger);
    color: white;
}

/* ===== MODAL  ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    z-index: 200;
    padding: 1rem;
    box-sizing: border-box;
}

.modal-content {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--border-radius-2);
  width: 400px;
  max-height: 90vh; /* limits height to viewport */
  overflow-y: auto; /* enables internal scrolling */
  box-shadow: var(--box-shadow);
  text-align: center;
  position: relative;
}


.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 1.5rem;
    cursor: pointer;
}

#add-client-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
}

#add-client-form select {
  padding: 0.5rem;
  border-radius: var(--border-radius-1);
  border: 1.5px solid #e2e8f0;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

#add-client-form input {
  padding: 0.5rem;
  border-radius: var(--border-radius-1);
  border: 1.5px solid #e2e8f0;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

#add-client-form label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: -4px;
}

#add-client-form select:focus,
#add-client-form input:focus {
  outline: none;
  border-color: #7380ec;
  box-shadow: 0 0 0 3px rgba(115,128,236,0.12);
}

#add-client-form input,
#add-client-form select
#add-client-form textarea {
  padding: 0.5rem;
  border-radius: var(--border-radius-1);
  border: 1px solid var(--color-light);
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

#view-client-modal .modal-content {
  width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: left;
}

#view-client-modal textarea {
  width: 100%;
  padding: 0.5rem;
  border-radius: var(--border-radius-1);
  border: 1px solid var(--color-light);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}


/* ===== HIDDEN SECTION UTILITY CLASS ===== */
.hidden-section {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Confirm modal - small variation */
.confirm-modal .modal-content.small {
  width: 360px;
  max-height: 80vh;
  padding: 1.2rem;
  border-radius: 12px;
  text-align: left;
}

.modal-content.small {
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.2rem;
  border-radius: 12px;
}

#export-pdf-modal .export-option-group {
  margin-bottom: 0.75rem;
}

#export-pdf-modal .export-group-label {
  margin-bottom: 0.25rem;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}



 /*===================RIGHT================================*/

 .right{
  margin-top: 1.4rem;
  min-width: 0;
 }

 .right .top{
  display: flex;
  justify-content: end ;
  gap: 2rem;
  padding-right: 1rem;
 }

 .right .top button {
  display: none;
 }

 .right .theme-toggler {
  background: var(--color-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 1.6rem;
  width: 4.2rem;
  cursor: pointer;
  border-radius: var(--border-radius-1);
 }

 .right .theme-toggler span{
  font-size: 1.2rem;
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
 }

.right .theme-toggler span.active{
  background: var(--color-primary);
  color: white;
  border-radius: var(--border-radius-1);
}
.right .top .profile{
  display: flex;
  gap: 2rem;
  text-align: right;

}
.right .recent-updates{
  margin-top: 1rem;
}

.right .recent-updates h2{
  margin-bottom:  0.8rem;

}

.right .recent-updates .updates{
  background: var(--color-white);
  padding: var(--card-padding);
  border-radius: var(--card-border-radius);
  box-shadow: var(--box-shadow);
  transition: all 300ms ease;
  overflow: hidden;
}


.right .recent-updates:hover{
   box-shadow: none;
}

.right .recent-updates .updates .update{
  display: grid;
  grid-template-columns: 2.6rem auto;
  gap: 1rem;
  margin-bottom: 1rem;
}

/*================sales analytics==============================*/
.right .sales-analytics{
  margin-top: 2rem;
}
.right .sales-analytics h2{
  margin-bottom: 0.8rem;
}
.right .sales-analytics .item{
  background-color: var(--color-white);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
  padding: 1.4rem var(--card-padding);
  border-radius: var(--border-radius-3);
  box-shadow: var(--box-shadow);
  transition: all 300ms ease;
}

.right .sales-analytics .item:hover{
box-shadow: none;
}

.right .sales-analytics .item .right{
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin: 0;
  width: 100%;

}

.right .sales-analytics .item .icon{
  padding: 0.6rem;
  color: var(--color-white);
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
}

.right .sales-analytics .item .offline .icon{
  background: var(--color-danger);
}

.right .sales-analytics .item .customers .icon {
  background: var(--color-success);
}

.right .sales-analytics .add-product{
  background-color: transparent;
  border: 2px dashed var(--color-primary);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.right .sales-analytics .add-product div{
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.right .sales-analytics .add-product:hover{
  background: var(--color-primary);
  color: white;
}

.right .sales-analytics .add-product div h3{
  font-weight: 600;

}

/* ====== Section Visibility ====== */
.hidden-section {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.active-section {
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease;
}


/* ===== Overlay (background dim) ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 999;
}
.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== Slide-in Client Details Panel ===== */
.client-details-panel {
  position: fixed;
  top: 50%;
  right: 50px;
  width: 50%;
  max-width: 700px;
  height: auto;
  max-height: 90vh;
  background: #f5f7ff;
  box-shadow: 0 12px 40px rgba(115, 128, 236, 0.18);
  border-left: 1px solid #e0e4fa;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  z-index: 2000;
  overflow-y: auto;
  font-family: 'Poppins', sans-serif;
  transform: translate(150vw, -50%);
  transition: transform 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.client-details-panel.open {
  transform: translate(0, -50%);
  opacity: 1;
  pointer-events: all;
}

body.dark-theme-variables #client-details-panel {
  background: #1e1e1e;
  color: #fff;
}


/* ===== Header Section ===== */
.client-details-header {
  background-color: rgb(96, 156, 229);
  color: var(--color-white, #fff);
  padding: var(--panel-padding);
  display: block;        /* ← IMPORTANT */
  align-items: center;
  gap: 1rem;
  border-top-left-radius: 20px;
  border-bottom: 1px solid #e2e8f0;
}
.close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #fff;
  margin-right: 10px;
  transition: color 0.2s ease;
}
.close-btn:hover {
  color: #f1f5f9;
}

/* ===== Client Avatar & Info ===== */
.client-avatar img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Profile card avatar alignment */
.client-avatar {
  margin: 0 0 10px 0; /* left-aligned */
}

.client-basic-info {
  flex: 1;
}
/* Profile card client name */
.client-basic-info h2 {
  margin: 0;
  font-size: 1.15rem; /* calmer, modern */
  font-weight: 600;
  color: #1e293b; /* slate-800 */
}

.status-badge {
  display: inline-block;
  background-color: var(--color-success, #22c55e);
  color: var(--color-dark, #fff);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 6px;
}

/* ===== Panel Body ===== */
.client-details-body {
  padding: var(--panel-padding);
  padding-left: 16px;
  padding-right: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}
.info-section {
  margin-bottom: 1.5rem;
}
.info-section h3 {
  font-size: 1rem;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.3rem;
  margin-bottom: 0.8rem;
}
.info-section p {
  margin: 0.4rem 0;
  color: #475569;
}

/* ===== Textarea Styling ===== */
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem;
  resize: vertical;
  font-family: inherit;
  font-size: 0.9rem;
  background-color: #f9fafb;
  transition: border 0.2s ease;
  min-height: 80px;
}
textarea:focus {
  border-color: #3b82f6;
  outline: none;
  background-color: #fff;
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
}

/* ===== Footer Section ===== */
.client-detail-footer {
  display: flex;
  justify-content: center; /* push buttons to the right */
  align-items: center;
  gap: 1rem; /* spacing between buttons */
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  background-color: var(--color-background);
  border-bottom-left-radius: 20px;
  position: sticky;
  bottom: 0; /* stays visible when scrolling */
}



/* ===== Buttons ===== */
.btn-primary,
.btn-secondary {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.3s ease;
}
.btn-primary {
  background-color: var(--color-primary, #3b82f6);
  color: #fff;
}
.btn-primary:hover {
  background-color: #2563eb;
}
.btn-secondary {
  background-color: #e2e8f0;
  color: #1e293b;
}
.btn-secondary:hover {
  background-color: #cbd5e1;
}

/* ===== Panel Actions ===== */
.panel-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.panel-actions .btn-primary,
.panel-actions .btn-secondary {
  flex: 0 0 auto;
  min-width: 100px;
}

/* ===== Search & Sort ===== */
.search-bar {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  width: 250px;
  transition: 0.3s ease;
}
.search-bar:focus {
  border-color: #4a90e2;
  outline: none;
  box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
}
th[data-sort] {
  cursor: pointer;
  transition: color 0.2s ease;
}
th[data-sort]:hover {
  color: #4a90e2;
}

/* ===== Client Row Hover ===== */
.client-row {
  cursor: pointer;
  transition: background 0.2s ease;
}
.client-row:hover {
  background-color: #f6f8ff;
}

.client-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: blod;
  text-transform: uppercase;
  margin: 0 auto 10px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.client-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
/* ===== Toast Notifications ===== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(-20px);
  animation: toast-slide-in 0.3s forwards, toast-fade-out 0.3s 2.7s forwards;
}

@keyframes toast-slide-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-fade-out {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}
.modal-content.small { width: 520px; max-height: 90vh; overflow-y: auto; }

/* ---------- Import Modal – Final Fixes ---------- */

/* Ensure the modal sits on top and receives pointer events */
#import-clients-modal {
  position: fixed !important;
  z-index: 99999999 !important;
  pointer-events: auto !important;
}

/* Ensure modal content and children accept pointer events */
#import-clients-modal .modal-content {
  pointer-events: auto !important;
  position: relative !important;
}

/* Make the import-mode area full width */
#import-clients-modal #import-mode {
  flex-basis: 100% !important;
  width: 100% !important;
  pointer-events: auto !important;
}

/* Make labels clearly clickable */
#import-clients-modal #import-mode label {
  cursor: pointer !important;
  user-select: none !important;
  display: block !important;
}

/* Ensure radio inputs have real size and accept clicks */
#import-clients-modal input[type="radio"] {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  margin-right: 8px !important;
  vertical-align: middle !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* File input sizing fix */
#import-clients-modal input[type="file"] {
  flex: 0 0 auto !important;
  max-width: 260px !important;
  min-width: 120px !important;
}
/* Highlight import mode options when hovering */
#import-clients-modal #import-mode label:hover {
  background: rgba(115, 128, 236, 0.12); /* soft primary tint */
  border-radius: 6px;
  padding: 4px 6px;
  transition: background 0.2s ease;
}
#import-clients-modal #import-mode label {
  padding: 4px 6px;
  border-radius: 6px;
}

/* ---------- Client Timeline Panel Styles (Phase 1) ---------- */
.client-details-panel .chip {
  display:inline-block;
  padding:6px 10px;
  background:#f1f5ff;
  color:#334155;
  border-radius:999px;
  font-size:0.88rem;
  box-shadow: 0 4px 10px rgba(18,27,64,0.03);
}
.client-details-panel .timeline-list .timeline-item {
  background: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #eef2ff;
  box-shadow: 0 6px 14px rgba(18,27,64,0.03);
}
.client-details-panel .badge-chip {
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:8px 10px;
  border-radius:12px;
  background:#fff;
  box-shadow: 0 6px 14px rgba(18,27,64,0.03);
  cursor:pointer;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.client-details-panel .badge-chip:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(18,27,64,0.08);
}
.client-details-panel .timeline-item small {
  color:#64748b;
  font-size:0.82rem;
}
.client-details-panel .timeline-item .item-title {
  font-weight:600;
  color:#0f172a;
  margin-bottom:4px;
}
.client-details-panel .badge-pop {
  animation: badgePop 520ms cubic-bezier(.2,.9,.3,1);
}
@keyframes badgePop {
  0% { transform: scale(.7); opacity:0; filter: blur(4px); }
  60% { transform: scale(1.08); opacity:1; filter: blur(0); }
  100% { transform: scale(1); opacity:1; }
}


.client-details-panel textarea:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167,139,250,0.25);
}


/* Quick notes area */
#panel-quick-notes {
  width: 100%;
  min-height: 90px;
  border: none;
  resize: vertical;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  background: transparent;
}

.hidden {
  display: none !important;
}

/* ===============================
   CLIENT PANEL — NOTION STYLE
   =============================== */

/* ---- Panel base ---- */
.pastel-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: inherit;
}

.pastel-section {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ---- Snapshot header ---- */
.snapshot {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.snapshot::after { display: none; }

.snapshot-left h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

.snapshot-left .meta {
  margin: 3px 0 0;
  font-size: 0.83rem;
  color: #94a3b8;
}

.snapshot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.snapshot-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ---- Chips ---- */
.pastel-chip {
  background: #f8fafc;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.8rem;
  color: #475569;
  border: 1px solid #e2e8f0;
  transition: border-color 180ms ease;
}

.pastel-chip:hover {
  border-color: #7380ec;
  color: #7380ec;
}

/* ---- Buttons ---- */
.pastel-btn-primary {
  background: #7380ec;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.84rem;
  box-shadow: 0 2px 8px rgba(115,128,236,0.25);
  transition: opacity 160ms ease, transform 160ms ease;
}

.pastel-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.pastel-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pastel-btn-secondary {
  background: #f8fafc;
  color: #475569;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.84rem;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.pastel-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #7380ec;
  color: #7380ec;
  box-shadow: 0 2px 8px rgba(115,128,236,0.12);
}

.pastel-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* ---- Icon button (📝 note button) ---- */
.btn-icon {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #475569;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.btn-icon:hover {
  background: #f1f5f9;
  border-color: #7380ec;
  box-shadow: 0 2px 8px rgba(115,128,236,0.12);
}

.btn-icon:hover {
  background: #eef2ff;
  border-color: #7380ec;
}

/* ---- Section headers ---- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.section-header h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.01em;
}

.section-header small {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ---- Timeline section ---- */
.timeline-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
}

.timeline-section .section-header h4::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}

/* ---- Activities section ---- */
.activities-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
}

.activities-section .section-header h4::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #7380ec;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}

/* ---- Timeline list ---- */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  padding: 8px 0;
}

/* ---- Timeline items ---- */
.timeline-item {
  position: relative;
  background: #fafafa;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #f1f5f9;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  animation: timelineIn 380ms ease forwards;
  transition: background 180ms ease, border-color 180ms ease;
}

.timeline-item:hover {
  background: #f8faff;
  border-color: #c7d2fe;
}

.timeline-item.expanded {
  background: #f5f7ff;
  border-color: #a5b4fc;
}

@keyframes timelineIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Timeline expand/collapse ---- */
.timeline-body.collapsed {
  max-height: 3.6em;
  overflow: hidden;
  position: relative;
}

.timeline-body.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.5em;
  background: linear-gradient(to bottom, transparent, #fafafa);
}

.timeline-item.expanded .timeline-body.collapsed::after {
  display: none;
}

/* ---- Timeline item text ---- */
.timeline-item small {
  color: #94a3b8;
  font-size: 0.8rem;
}

.timeline-item .item-title {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
  font-size: 0.9rem;
}

/* ---- Activities list ---- */
.activities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activities-list > div {
  background: #fafafa;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 180ms ease;
}

.activities-list > div:hover {
  border-color: #c4b5fd;
}

/* ---- Badges ---- */
.badges-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.badge-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #f1f5f9;
  cursor: pointer;
  transition: border-color 200ms ease, transform 200ms ease;
}

.badge-chip:hover {
  border-color: #7380ec;
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fefce8;
  color: #854d0e;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #fde68a;
}

.badge-earned {
  animation: badgePop 520ms cubic-bezier(.2,.9,.3,1);
}

@keyframes badgePop {
  0%   { transform: scale(.7); opacity: 0; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); }
}

/* ---- Progress bar ---- */
.progress-track {
  height: 5px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 40%;
  background: #7380ec;
  border-radius: 999px;
}

/* ---- Notes wrapper ---- */
#panel-notes-wrapper {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 0;
  margin-bottom: 4px;
  position: relative;
  z-index: 5;
}

#panel-notes-wrapper.hidden {
  display: none;
  pointer-events: none;
}

.panel-notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid #c7d2fe;
  font-weight: 600;
  font-size: 0.83rem;
  color: #4338ca;
}

#panel-close-notes {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #4338ca;
  opacity: 0.6;
}

#panel-close-notes:hover { opacity: 1; }

.panel-notes-body { padding: 10px 14px; }

.panel-notes.collapsed textarea { display: none; }

#panel-quick-notes {
  width: 100%;
  min-height: 80px;
  border: none;
  resize: vertical;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  background: transparent;
  color: #1e293b;
}

.notes-actions {
  padding: 6px 14px 10px;
}

.primary-btn {
  background: #7380ec;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 150ms ease;
}

.primary-btn:hover { opacity: 0.88; }

/* ---- Session indicator ---- */
.session-indicator {
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid #a7f3d0;
}

.session-indicator.hidden { display: none; }

/* ---- Footer ---- */
.client-detail-footer {
  min-height: 52px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 1.2rem;
}

.auto-save-label {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ---- Profile card ---- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.2rem;
  position: relative;
}

.profile-card .client-avatar {
  margin: 0 !important;
  flex-shrink: 0;
}

.profile-card .client-basic-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-card #panel-client-name,
.profile-card #detailName {
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 600;
}

.profile-card .close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f8fafc;
  border: none;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #94a3b8;
  transition: background 150ms ease, color 150ms ease;
}

.profile-card .close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.profile-card .status-badge { align-self: flex-start; }

/* ---- Micro interactions ---- */
.client-details-panel button {
  transition: transform 150ms ease, opacity 150ms ease;
}

.client-details-panel button:active { transform: scale(0.97); }

/* ---- Timeline filter tabs ---- */
.timeline-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tl-filter {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 180ms, color 180ms, border-color 180ms;
}

.tl-filter.active {
  background: #7380ec;
  color: #fff;
  border-color: #7380ec;
}

.tl-filter:hover:not(.active) {
  background: #eef2ff;
  color: #7380ec;
  border-color: #7380ec;
}

/* ---- Timeline ⋮ menu ---- */
.tl-menu-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #94a3b8;
  padding: 2px 5px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 150ms;
}

.timeline-item:hover .tl-menu-btn { opacity: 1; }

.tl-dropdown {
  position: absolute;
  top: 26px;
  right: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 100000;
  min-width: 110px;
  overflow: hidden;
}

.tl-dropdown button {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.88rem;
  color: #0f172a;
  transition: background 130ms;
}

.tl-dropdown button:hover { background: #f8fafc; }
.tl-dropdown .tl-delete-btn { color: #ef4444; }

/* ---- Export PDF modal ---- */
.export-preset-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms, border-color 180ms, color 180ms;
  text-align: center;
}

.export-preset-btn:hover,
.export-preset-btn.active {
  background: #7380ec;
  border-color: #7380ec;
  color: #fff;
}

.export-option-group {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.export-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.export-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: #334155;
  padding: 4px 0;
  cursor: pointer;
}

.export-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: #7380ec;
  cursor: pointer;
}

.export-checkbox-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #7380ec;
  cursor: pointer;
}

/* ---- Hidden utility ---- */
.hidden { display: none !important; }

/* ================================
   ACTIVITIES LIBRARY PAGE
   ================================ */

.activities-page {
  padding: 0 0 2rem;
}

.activities-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.activities-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.2rem;
}

.activities-subtitle {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0;
}

/* ---- Search + filters ---- */
.activities-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.activity-search-bar {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  font-size: 0.9rem;
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.activity-search-bar:focus {
  outline: none;
  border-color: #7380ec;
  box-shadow: 0 0 0 3px rgba(115,128,236,0.12);
}

.activity-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.activity-chip {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
}

.activity-chip.active {
  background: #7380ec;
  border-color: #7380ec;
  color: #ffffff;
}

.activity-chip:hover:not(.active) {
  border-color: #7380ec;
  color: #7380ec;
  background: #eef2ff;
}

/* ---- Activity grid ---- */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ---- Activity card ---- */
.activity-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1.5px solid #f1f5f9;
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(115,128,236,0.15);
  border-color: #c7d2fe;
}

.activity-card-cover {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.activity-card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activity-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.activity-card-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
  flex: 1;
}

.activity-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.activity-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.activity-tag.secondary {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

.activity-card-ages {
  font-size: 0.75rem;
  color: #94a3b8;
}

.activity-card-assign-btn {
  background: #7380ec;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 150ms ease;
  margin-top: 8px;
  width: 100%;
}

.activity-card-assign-btn:hover {
  opacity: 0.88;
}

/* ---- Activity ratings ---- */
.activity-stars {
  font-size: 0.78rem;
  color: #f59e0b;
  letter-spacing: 1px;
}

/* ---- Empty state ---- */
.activity-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* ---- Preview modal ---- */
.activity-preview-content {
  width: 520px;
  max-width: 95vw;
  max-height: 88vh;
  overflow-y: auto;
  text-align: left;
  padding: 0;
  border-radius: 18px;
}

.activity-preview-hero {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px 18px 0 0;
  position: relative;
}

.activity-preview-emoji {
  font-size: 4rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.activity-preview-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  transition: background 150ms ease;
  z-index: 2;
}

.activity-preview-close:hover {
  background: #fff;
}

.activity-preview-body {
  padding: 20px 24px 28px;
}

.activity-preview-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.activity-preview-body h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 8px;
}

.preview-description {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.preview-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #f1f5f9;
}

.preview-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-detail-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-detail-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
}

.preview-what-it-does {
  background: #f0f4ff;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  border: 1px solid #e0e7ff;
}

.preview-what-it-does h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4338ca;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preview-what-it-does p {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

.preview-actions {
  display: flex;
  justify-content: flex-end;
}

.preview-assign-btn {
  padding: 10px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
}
/* ── Dashboard ───────────────────────────────────────────────── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dashboard-card {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
}

.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.dashboard-card-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.todays-sessions {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}



#panel-charts-section canvas {
  max-width: 100%;
  display: block;
}

.prof-spec-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: all 150ms ease;
  user-select: none;
}
.prof-spec-chip:hover {
  border-color: #7380ec;
  color: #7380ec;
}
.prof-spec-chip.selected {
  background: #eef2ff;
  border-color: #7380ec;
  color: #7380ec;
  font-weight: 700;
}

.settings-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 1.25rem;
}
.settings-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 1rem;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid #f1f5f9;
}
.settings-row:first-of-type { border-top: none; }
.settings-label { flex: 1; min-width: 0; }
.settings-label-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}
.settings-label-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}
.settings-select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 140px;
}
.settings-btn-group {
  display: flex;
  gap: 0;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.settings-size-btn,
.settings-density-btn {
  padding: 7px 14px;
  background: #f8fafc;
  border: none;
  border-right: 1px solid #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transition: all 150ms ease;
}
.settings-size-btn:last-child,
.settings-density-btn:last-child { border-right: none; }
.settings-size-btn.active,
.settings-density-btn.active {
  background: #eef2ff;
  color: #7380ec;
  font-weight: 700;
}
.settings-size-btn small,
.settings-density-btn small {
  font-size: 0.65rem;
  opacity: 0.7;
}

/* Density classes */
body.density-compact .pastel-section   { padding: 0.75rem; }
body.density-compact .timeline-item    { padding: 8px 10px; }
body.density-compact .settings-card    { padding: 1rem 1.25rem; }
body.density-comfortable .pastel-section { padding: 1.25rem; }



.wiz-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: background 200ms ease, transform 200ms ease;
}
.wiz-dot.active {
  background: #7380ec;
  transform: scale(1.2);
}
.wiz-dot.done {
  background: #10b981;
}
.wiz-dir-active {
  border-color: #7380ec !important;
  background: #eef2ff !important;
  color: #7380ec;
}

.client-row-hidden { display: none; }

/*========media queries tablet============*/
@media screen and (max-width: 1200px) {
  .container {
    width: 94%;
    grid-template-columns: 7rem auto 20rem;
  }

  aside .logo h2 { display: none; }
  aside .sidebar h3 { display: none; }
  aside .sidebar a { width: 5.6rem; }
  aside .sidebar a:last-child {
    position: relative;
    margin-top: 1.8rem;
  }

  main .insights {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  #week-schedule-grid {
    flex-wrap: wrap;
  }
  #week-schedule-grid > div {
    flex: 1 1 calc(25% - 8px);
    min-width: 80px;
  }
}

/*========media queries mobile============*/
@media screen and (max-width: 760px) {
  .container {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* ── Sidebar: hidden off-screen by default ── */
  aside {
    position: fixed;
    top: 0;
    left: -100%;
    width: 18rem;
    height: 100vh;
    background: var(--color-white);
    z-index: 300;
    box-shadow: 1rem 4rem 4rem rgba(0,0,0,0.15);
    padding-right: var(--card-padding);
    transition: left 300ms ease;
  }

  aside.open {
    left: 0;
  }

  aside .logo { margin-left: 1rem; }
  aside .logo h2 { display: inline; }
  aside .sidebar h3 { display: inline; }
  aside .sidebar a { width: 100%; height: 3.4rem; }
  aside .sidebar a:last-child { position: absolute; bottom: 5rem; }
  aside .close { display: inline-block; cursor: pointer; }

  /* ── Right panel: fixed top bar on mobile ── */
  .right {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    margin: 0;
  }

  .right .top {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    height: 4.6rem;
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    gap: 1rem;
  }

  /* Show the menu button */
  .right .top button#menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-dark);
    padding: 0;
    flex-shrink: 0;
  }

  .right .top button#menu-btn span {
    font-size: 2rem;
  }

  /* Hide the recent activity panel on mobile — it'd crowd the top bar */
  .right .recent-updates { display: none; }

  /* Profile info text hidden, just show avatar */
  .right .top .profile .info { display: none; }

  /* Push main content below the fixed top bar */
  main {
    margin-top: 5.5rem;
    padding: 0 1rem 4rem;
  }

  /* Stack stat cards to single column */
  main .insights {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }

  /* Week schedule: wrap to 2 per row */
  #week-schedule-grid {
    flex-wrap: wrap;
  }
  #week-schedule-grid > div {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  /* Client panel full width */
  .client-details-panel {
    width: 100% !important;
    right: -100% !important;
  }
  .client-details-panel.open {
    right: 0 !important;
  }

  /* Modals full width */
  .modal-content {
    width: 95% !important;
    max-width: 100% !important;
    padding: 1.25rem !important;
  }

  /* Billing records — stack amount/actions */
  #billing-records-list > div {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Today's sessions chips wrap */
  #todays-sessions-list {
    display: flex;
    flex-wrap: wrap;
  }
}

/* ── Mobile sidebar overlay backdrop ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 299;
}
.sidebar-backdrop.active {
  display: block;
}