/* ============================================================
   BASE.CSS — New Paths Counseling Design System
   Aesthetic: Refined clinical calm — soft sage, warm whites,
   precise typography, gentle depth. Trustworthy and modern.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Brand */
  --brand-50:  #f0f7f4;
  --brand-100: #d9ede6;
  --brand-200: #b3dace;
  --brand-300: #7ebfab;
  --brand-400: #4ea089;
  --brand-500: #2d8470;
  --brand-600: #1e6b5a;
  --brand-700: #185548;
  --brand-800: #144339;
  --brand-900: #0f332c;

  /* Neutrals */
  --n-0:   #ffffff;
  --n-50:  #f8f9f8;
  --n-100: #f1f3f1;
  --n-150: #e8ebe8;
  --n-200: #dde1dd;
  --n-300: #c4c9c4;
  --n-400: #9aa09a;
  --n-500: #6b736b;
  --n-600: #4a514a;
  --n-700: #333a33;
  --n-800: #1e231e;
  --n-900: #0d0f0d;

  /* Accent */
  --accent-blue:    #3b7dd8;
  --accent-blue-lt: #eff4fd;
  --accent-amber:   #d97706;
  --accent-amber-lt:#fffbeb;
  --accent-red:     #dc3545;
  --accent-red-lt:  #fef2f2;
  --accent-green:   #198754;
  --accent-green-lt:#f0fdf4;

  /* Typography */
  --font-sans:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radius */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.14), 0 8px 16px rgba(0,0,0,0.08);

  /* Transitions */
  --t-fast:   0.12s ease;
  --t-normal: 0.2s ease;
  --t-slow:   0.35s ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--n-700);
  background: var(--n-50);
  min-height: 100vh;
}

a { color: var(--brand-500); text-decoration: none; }
a:hover { color: var(--brand-600); }

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

/* ── Typography Utilities ────────────────────────────────── */
.text-xs-muted   { font-size: 12px; color: var(--n-400); }
.text-sm         { font-size: 13px; color: var(--n-600); }
.text-sm-medium  { font-size: 13px; font-weight: 500; color: var(--n-700); }
.text-sm-medium-blue { font-size: 13px; font-weight: 500; color: var(--brand-500); }
.text-sm-medium-dark { font-size: 13px; font-weight: 600; color: var(--n-700); }
.text-sm-muted   { font-size: 13px; color: var(--n-400); }
.text-sm-muted-0 { font-size: 13px; color: var(--n-500); margin: 0; }
.text-sm-semibold { font-size: 13px; font-weight: 600; color: var(--n-700); }
.text-sm-semibold-lg { font-size: 14px; font-weight: 600; color: var(--n-700); margin-bottom: var(--space-3); }
.text-md-semibold { font-size: 14px; font-weight: 600; color: var(--n-800); margin: 0 0 2px; }
.text-lg-semibold { font-size: 18px; font-weight: 600; color: var(--n-800); }
.text-nav-item    { padding: 14px 0; font-size: 14px; font-weight: 500; color: var(--n-400); border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; transition: color var(--t-fast); }
.text-nav-item:hover { color: var(--n-600); }
.text-link        { color: var(--brand-500); font-size: 13px; font-weight: 500; cursor: pointer; }
.text-link:hover  { color: var(--brand-600); text-decoration: underline; }
.text-link-sm     { color: var(--brand-500); font-size: 12px; font-weight: 500; cursor: pointer; }
.text-xs-light    { font-size: 12px; color: var(--n-400); font-weight: 400; }
.label-login      { display: block; font-size: 11px; font-weight: 700; color: var(--n-400); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.label-xs         { display: block; font-size: 11px; font-weight: 700; color: var(--n-400); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--space-2); }
.label-md         { display: block; font-size: 13px; font-weight: 600; color: var(--n-700); margin-bottom: var(--space-2); }
.label-sm-bold    { display: block; font-size: 12px; font-weight: 700; color: var(--n-600); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--space-2); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-0);
  color: var(--n-700);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover {
  background: var(--n-50);
  border-color: var(--n-300);
  color: var(--n-800);
}

.btn-primary {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: var(--n-0);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: var(--n-0);
}

.btn-secondary {
  background: var(--n-0);
  border-color: var(--n-200);
  color: var(--n-600);
}
.btn-secondary:hover {
  background: var(--n-100);
  border-color: var(--n-300);
}

.btn-danger {
  background: var(--accent-red-lt);
  border-color: transparent;
  color: var(--accent-red);
}
.btn-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--n-500);
  font-size: 16px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn-icon:hover {
  background: var(--n-100);
  color: var(--n-700);
}

.btn-ghost { background: transparent; border: none; color: var(--n-500); font-size: 12px; padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; transition: all var(--t-fast); }
.btn-ghost:hover { background: var(--n-100); color: var(--n-700); }
.btn-ghost-bold   { @extend .btn-ghost; font-weight: 700; }
.btn-ghost-italic { @extend .btn-ghost; font-style: italic; }
.btn-ghost-strike { @extend .btn-ghost; text-decoration: line-through; }
.btn-ghost-sm     { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-sm); border: 1.5px solid var(--n-200); background: var(--n-0); color: var(--n-500); font-size: 14px; cursor: pointer; transition: all var(--t-fast); }
.btn-ghost-sm:hover { background: var(--n-100); color: var(--n-700); }
.btn-ghost-blue { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--r-sm); color: var(--brand-400); font-size: 14px; cursor: pointer; transition: all var(--t-fast); }

/* ── Form Elements ───────────────────────────────────────── */
.field-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-0);
  color: var(--n-800);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.field-input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(46,132,112,0.12);
}
.field-input::placeholder { color: var(--n-300); }
select.field-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

input[type="text"], input[type="email"], input[type="tel"],
input[type="password"], input[type="date"], input[type="time"],
input[type="number"], select, textarea {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--n-800);
  background: var(--n-0);
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus,
input[type="password"]:focus, input[type="date"]:focus, input[type="time"]:focus,
input[type="number"]:focus, select:focus, textarea:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(46,132,112,0.12);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa09a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
textarea { resize: vertical; line-height: 1.6; }

.field-input-sm {
  padding: 6px 10px;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--n-600);
  background: var(--n-0);
  outline: none;
  transition: border-color var(--t-fast);
}
.field-input-sm:focus { border-color: var(--brand-400); }
.field-input-sm:disabled { background: var(--n-100); color: var(--n-300); }

.field-textarea {
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--n-800);
  resize: vertical;
  outline: none;
}
.field-textarea::placeholder { color: var(--n-300); }

.field-border {
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.field-border:focus-within {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(46,132,112,0.10);
}

.field-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--brand-500);
  cursor: pointer;
  flex-shrink: 0;
}
.field-checkbox-sm {
  width: 14px;
  height: 14px;
  accent-color: var(--brand-500);
  cursor: pointer;
  flex-shrink: 0;
}

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--n-200);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--t-normal);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--t-normal);
  box-shadow: var(--shadow-xs);
}
.toggle-switch input:checked + .toggle-slider { background: var(--brand-500); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* ── Layout Utilities ────────────────────────────────────── */
.flex-row       { display: flex; align-items: center; gap: var(--space-2); }
.flex-row-4     { display: flex; align-items: center; gap: var(--space-1); }
.flex-row-10    { display: flex; align-items: center; gap: 10px; }
.flex-row-12    { display: flex; align-items: center; gap: 12px; }
.flex-row-12-mb { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.flex-row-16    { display: flex; align-items: center; gap: var(--space-4); }
.flex-row-action { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.flex-row-click  { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.flex-between    { display: flex; justify-content: space-between; align-items: center; }
.flex-between-sm { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.flex-between-center { display: flex; justify-content: space-between; align-items: center; }
.flex-1 { flex: 1; }

.mb-16 { margin-bottom: var(--space-4); }
.mb-20 { margin-bottom: var(--space-5); }
.mb-24 { margin-bottom: var(--space-6); }
.mt-24 { margin-top: var(--space-6); }

.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.modal-max-md { max-width: 600px; }
.modal-max-sm { max-width: 520px; }
.p-body { padding: 24px; }

/* ── Avatar ──────────────────────────────────────────────── */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--n-150);
  color: var(--n-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Notifications ───────────────────────────────────────── */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 360px;
}
.notification.success { background: var(--accent-green-lt); color: #166534; border-left: 4px solid var(--accent-green); }
.notification.error   { background: var(--accent-red-lt);   color: #991b1b; border-left: 4px solid var(--accent-red);   }
.notification.info    { background: var(--accent-blue-lt);  color: #1e40af; border-left: 4px solid var(--accent-blue);  }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Search Box ──────────────────────────────────────────── */
.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 12px;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-0);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search-box:focus-within {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(46,132,112,0.10);
}
.search-box input {
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--n-800);
  outline: none;
  width: 100%;
  padding: 0;
}
.search-box span { color: var(--n-400); font-size: 14px; flex-shrink: 0; }

/* ── Info box ────────────────────────────────────────────── */
.info-box {
  background: var(--accent-blue-lt);
  border: 1px solid #bfdbfe;
  border-radius: var(--r-sm);
  padding: var(--space-4);
  font-size: 13px;
  color: #1e40af;
  margin-bottom: var(--space-5);
  line-height: 1.6;
}
.info-box ul { margin: var(--space-2) 0 0 var(--space-5); }
.info-box li { margin-bottom: var(--space-1); }

/* ── Getting started cards ───────────────────────────────── */
.getting-started-card {
  padding: var(--space-5);
  border: 1.5px solid var(--n-150);
  border-radius: var(--r-md);
  background: var(--n-0);
  cursor: pointer;
  transition: all var(--t-normal);
  box-shadow: var(--shadow-xs);
}
.getting-started-card:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: var(--brand-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--n-200); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--n-300); }

/* ── Help button ─────────────────────────────────────────── */
.help-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-500);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 100;
  transition: all var(--t-fast);
}
.help-btn:hover {
  background: var(--brand-600);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* ── Modal toolbar ───────────────────────────────────────── */
.modal-toolbar {
  display: flex;
  gap: 2px;
  padding: 6px 8px;
  background: var(--n-50);
  border-bottom: 1px solid var(--n-150);
}
.modal-toolbar button {
  padding: 4px 7px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--n-500);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--t-fast);
}
.modal-toolbar button:hover {
  background: var(--n-150);
  color: var(--n-700);
}

/* ── Export button (billing) ─────────────────────────────── */
.export-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-0);
  color: var(--n-600);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}
.export-button:hover { background: var(--n-100); border-color: var(--n-300); }

/* ── Remove button ───────────────────────────────────────── */
.remove-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--n-400);
  font-size: 18px;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.remove-btn:hover { color: var(--accent-red); background: var(--accent-red-lt); }

/* ── Add link ────────────────────────────────────────────── */
.add-link {
  color: var(--brand-500);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  transition: color var(--t-fast);
}
.add-link:hover { color: var(--brand-600); }

/* ── Date Range Filter ───────────────────────────────────── */
.date-range-filter {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--n-0);
  border: 1.5px solid var(--n-150);
  border-radius: var(--r-sm);
  margin-bottom: var(--space-4);
  font-size: 13px;
  color: var(--n-600);
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--space-4);
  border-top: 1px solid var(--n-150);
}
.pagination-info { font-size: 13px; color: var(--n-400); display: flex; align-items: center; gap: 8px; }
.pagination-info select { padding: 4px 24px 4px 8px; font-size: 13px; border-radius: var(--r-sm); }
.pagination-controls { display: flex; gap: 4px; }

/* ── Contact row ─────────────────────────────────────────── */
.contact-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}

/* ── Status dropdown in edit client ─────────────────────── */
.status-dropdown select {
  padding: 4px 28px 4px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-full);
  background-color: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-700);
}

/* ── Print styles ────────────────────────────────────────── */
@media print {
    .no-print { display: none !important; }
}
