/* ------------------------------------------------------------------
   DESIGN TOKENS (colors, spacing, typography)
   ------------------------------------------------------------------ */

:root {
  --bg: #ffffff;
  --card: #f3f3ff;
  --sidebar-active-bg: #dadaff;
  --light-hover: #f3f3ff;
  --border: #f6f6fe;
  --text-blue: #483eff;
  --button-hover: hsl(244, 100%, 65%);
  --black: #4a4a4a;
  --muted: #6b7280;
  --accent: #EDF2FF;

  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --success: #10b981;
  --primary-dark: #4338ca;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --border-standard: 0.50px solid var(--gray-200);
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;

  --font-base: clamp(14px, 1.2vw, 16px);
  --font-sm: clamp(12px, 1vw, 12px);
  --font-lg: clamp(18px, 2vw, 24px);

  --space-2: clamp(8px, 1vw, 12px);
  --space-3: clamp(12px, 1.2vw, 16px);

  --radius: 8px;

  --auth-width: 285px;
  --field-width: 250px;
}

/* ------------------------------------------------------------------
   BASE
   ------------------------------------------------------------------ */

.hidden {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text-blue);
  font-size: var(--font-base);
}

.divider-vertical {
  width: 0;
  height: 20px;
  border-left: var(--border-standard);
  margin: 0 12px;
  display: inline-block;
  vertical-align: middle;
}
/* ------------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------------ */

.button-primary {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 10px;
  border: 1px solid var(--text-blue);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text-blue);
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
}

.filter-actions .button-primary {
  width: auto;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(135deg, #0c1228 0%, #0c1228 85%, #121d3a 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s, box-shadow 0.2s;
}

.filter-actions .button-primary:hover {
  background: linear-gradient(135deg, #121d3a 0%, #121d3a 85%, #1a2848 100%);
  box-shadow: 0 4px 12px rgba(72, 62, 255, 0.2);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--border);
}

.center-row {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

/* App-wide button component */

.btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: var(--border-standard);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  font-size: var(--font-sm);
}

.btn-primary {
  background: var(--text-blue);
  color: var(--bg);
  padding: 6px 15px;
  font-size: 14px;
  border: 1px solid var(--text-blue);
}

.btn-primary:hover {
  background: var(--button-hover);
  color: var(--bg);
  filter: brightness(1.05);
}

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

.btn-sm {
  padding: 6px 10px;
  font-size: 14px;
}

.btn-icon {
  min-width: 32px;
  padding: 6px 8px;
  text-align: center;
}

.btn-secondary {
  background: var(--bg);
  color: var(--gray-700);
  border: var(--border-standard);
}

.btn-secondary:hover {
  border: var(--border-standard);
  color: var(--gray-700);
  filter: brightness(1.05);
}

.btn-ghost {
  background: var(--bg);
  color: var(--primary-dark);
  border: 1px solid var(--text-blue);
}

.btn-ghost:hover {
  background: var(--gray-50);
}
/* ------------------------------------------------------------------
   FORMS
   ------------------------------------------------------------------ */

.form-grid {
  display: grid;
  gap: 8px;
  /* Reduced from 14px */
}

.form-grid label {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
  /* Reduced from 5px */
  font-size: var(--font-sm);
}

.form-grid input:not([type="submit"]) {
  width: var(--field-width);
  max-width: 100%;
  padding: 10px 16px;
  border: var(--border-standard);
  border-radius: var(--radius);
  font-size: 14px;
}

.form-grid input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 6px 1px var(--border);
}

/* Horizontal form rows (used in modals/pages) */

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.form-row--compact {
  gap: 50px;
  margin-bottom: 8px;
}

.form-field {
  flex: 1 1 0;
  min-width: 130px;
  max-width: 180px;
}

.form-row--compact .form-field {
  min-width: 140px;
}

.form-field--narrow {
  flex: 0 0 260px;
  max-width: 260px;
}

.form-field--auto {
  flex: 0 0 auto;
  min-width: auto;
}

.form-row--2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 4px;
  /* Reduced from 8px */
  margin-bottom: 6px;
  /* Reduced from 12px */
}

@media (max-width: 768px) {
  .form-row--2 {
    grid-template-columns: 1fr;
  }
}

.form-field label {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
  /* Reduced from 4px */
}

.form-field--notes-wide {
  max-width: 400px;
}

.form-field--full {
  max-width: 100%;
  width: 100%;
}

.form-separator {
  border: none;
  border-top: var(--border-standard);
  margin: 12px 0;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  gap: 8px;
}

.input,
.select {
  width: 100%;
  padding: 8px 10px;
  border: var(--border-standard);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  /* Consistent line-height */
  height: 38px;
  /* Strict height matching */
  box-sizing: border-box;
}

input[type="datetime-local"].input {
  line-height: 1.5;
  height: 38px;
  padding: 8px 10px;
}

select.input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

.textarea {
  width: 100%;
  padding: 8px 10px;
  border: var(--border-standard);
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.textarea--notes-main {
  min-height: 80px;
  max-height: 50px;
}

.textarea--notes-modal {
  min-height: 40px;
  max-height: 160px;
}

/* Duration input (number + unit selector) */

.duration-input-row {
  display: flex;
  gap: 8px;
}

.duration-input-row__number {
  flex: 1;
}

.duration-input-row__unit {
  width: 110px;
  flex-shrink: 0;
}
/* ------------------------------------------------------------------
   TABLES
   ------------------------------------------------------------------ */

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg);
  border: var(--border-standard);
  border-radius: 0px;
  overflow: hidden;
}

.table thead {
  background: var(--gray-50);
}

.table th {
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gray-400);
}

.table td {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--black);
  border-bottom: var(--border-standard);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--gray-50);
}

.table-row--clickable {
  cursor: pointer;
}

.table-link-editable {
  color: var(--text-blue);
  text-decoration: none;
  cursor: pointer;
  text-underline-offset: 2px;
}

.table-link-editable:hover {
  text-decoration: underline;
}

.actions-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.table-empty {
  padding: 12px;
  text-align: center;
  color: var(--muted);
}

/* ------------------------------------------------------------------
   INLINE NOTES (Generic table inline notes)
   ------------------------------------------------------------------ */

.notes-cell {
  position: relative;
}

.lead-notes-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.notes-preview {
  display: inline-block;
  cursor: pointer;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: underline;
  font-size: 13px;
  color: var(--muted);
}

.notes-preview--empty {
  font-style: italic;
  color: var(--gray-400);
}

.notes-popup {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 6px;
  z-index: 20;
  width: 320px;
  padding: 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.notes-popup textarea {
  width: 100%;
  min-height: 110px;
  padding: 8px 10px;
  border: 1px solid var(--text-blue);
  border-radius: 6px;
  resize: vertical;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.4;
  font-family: inherit;
}

.notes-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.notes-popup-cancel {
  padding: 6px 12px;
  border: 1px solid var(--gray-300);
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--font-sm);
}

.notes-popup-save {
  padding: 6px 12px;
  border: none;
  background: var(--text-blue);
  color: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--font-sm);
}
/* ------------------------------------------------------------------
   KPI CARDS
   ------------------------------------------------------------------ */

.kpi-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 0 24px;
}

.kpi-card {
  flex: 1 1 190px;
  max-width: 240px;
  padding: 14px 16px;
  border-radius: 10px;
  border: var(--border-standard);
  background: var(--bg);
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-card-label,
.kpi-card-value {
  color: var(--black);
}

.kpi-card-label {
  margin-right: 8px;
  font-size: 13px;
  text-transform: lowercase;
  color: var(--text-blue);
}

.kpi-card-value {
  font-size: 14px;
  font-weight: 400;
}

.kpi-grid-empty {
  padding: 16px 0;
  color: var(--text-muted, #888);
  font-size: 13px;
}

/* ------------------------------------------------------------------
   KPI TREND CHART
   ------------------------------------------------------------------ */

.chart-card {
  margin: 20px 0 0;
  border: var(--border-standard);
  border-radius: 0;
  border-left: none;
  border-right: none;
  background: var(--bg);
  overflow: hidden;
}

.chart-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: none;
}

.chart-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #888);
  white-space: nowrap;
}

.chart-card-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

.chart-card-form__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-card-form__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Compare dropdown */

.compare-toggle__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-blue);
  white-space: nowrap;
}

.compare-dropdown {
  position: relative;
}

.compare-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: var(--bg);
  white-space: nowrap;
  min-width: 120px;
}

.compare-dropdown__arrow {
  font-size: 10px;
  color: var(--text-muted, #888);
  margin-left: auto;
}

.compare-dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background: var(--bg);
  border: var(--border-standard);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 6px 0;
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
}

.compare-dropdown__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--black);
  cursor: pointer;
  white-space: nowrap;
}

.compare-dropdown__option:hover {
  background: var(--light-hover, #f3f3ff);
}

.compare-dropdown__option input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--text-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.filter-field--chart {
  max-width: 180px;
}

.filter-input--inline {
  height: 28px;
  font-size: 12px;
  padding: 0 8px;
  border-radius: 6px;
}

.chart-card-body {
  padding: 20px;
  height: 240px;
  position: relative;
}

/* ------------------------------------------------------------------
   KPI TABLE (Monthly Breakdown)
   ------------------------------------------------------------------ */

.kpi-table {
  border: none;
  border-radius: 0;
}

.kpi-table thead {
  background: var(--bg, #fff);
}

.kpi-table th,
.kpi-table td {
  border-right: var(--border-standard);
}

.kpi-table th:last-child,
.kpi-table td:last-child {
  border-right: none;
}

.kpi-table th {
  color: var(--text-blue);
  border-bottom: var(--border-standard);
}

.kpi-table__current {
  background-color: transparent;
}

.chart-card:has(.kpi-table) {
  overflow-x: auto;
  margin: 20px 0 40px;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

/* ------------------------------------------------------------------
   KPI TREND TABLE (Period Comparison)
   ------------------------------------------------------------------ */

.trend-card {
  margin: 20px 24px 0;
  border: var(--border-standard);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}

.trend-card__header {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: var(--border-standard);
}

.trend-card__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #888);
}

.trend-card .table {
  border: none;
  border-radius: 0;
}

.trend-cell--muted {
  color: var(--gray-400);
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.trend-badge--up {
  color: #059669;
  background: #ecfdf5;
}

.trend-badge--down {
  color: var(--danger);
  background: #fef2f2;
}

.trend-badge--flat {
  color: var(--gray-400);
  background: var(--gray-50);
}

/* ------------------------------------------------------------------
   VIEW TOGGLE (Basic / Advanced)
   ------------------------------------------------------------------ */

.view-toggle-row {
  padding: 0 24px;
  margin-top: 16px;
}

.view-toggle {
  display: inline-flex;
  gap: 0;
  border: var(--border-standard);
  border-radius: 8px;
  overflow: hidden;
}

.view-toggle__btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #888);
  text-decoration: none;
  background: var(--bg);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.view-toggle__btn:hover {
  background: var(--light-hover, #f3f3ff);
  text-decoration: none;
}

.view-toggle__btn--active {
  background: var(--text-blue);
  color: #fff;
}

.view-toggle__btn--active:hover {
  background: var(--text-blue);
  color: #fff;
}

/* ------------------------------------------------------------------
   BASIC KPI GRID (square cards, edge-to-edge)
   ------------------------------------------------------------------ */

.kpi-grid--basic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0;
  margin-top: 16px;
  padding: 0;
  border-top: none;
  border-left: none;
}

.kpi-grid--basic .kpi-card {
  flex: none;
  max-width: none;
  aspect-ratio: 4 / 3;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
  border-radius: 0;
  border: none;
  border-right: var(--border-standard);
  border-bottom: var(--border-standard);
  padding: 16px;
  background: var(--bg);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: default;
}

.kpi-grid--basic .kpi-card:hover {
  background: var(--light-hover, #f3f3ff);
  box-shadow: 0 4px 16px rgba(72, 62, 255, 0.10);
  transform: translateY(-2px);
  z-index: 1;
}

.kpi-grid--basic .kpi-card-label {
  margin-right: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 4px 12px;
}

.kpi-grid--basic .kpi-card-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-blue);
}

/* ------------------------------------------------------------------
   FLASH / ALERT BOXES
   ------------------------------------------------------------------ */

.error-box {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
}

.error-box ul {
  margin: 0;
  padding-left: clamp(12px, 2.5vw, 18px);
}

.notice-box {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
}
/* ------------------------------------------------------------------
   MODALS (Turbo frame overlays)
   ------------------------------------------------------------------ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-panel {
  background: var(--bg);
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 16px;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  text-decoration: none;
  color: var(--danger);
  font-size: 30px;
}

.modal-panel--wide {
  max-width: 680px;
}

/* Drawer variant — slides in from the right */

.modal-backdrop--drawer {
  align-items: stretch;
  justify-content: flex-end;
}

.modal-panel--drawer {
  max-width: 560px;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow-y: auto;
  padding: 24px 28px;
  animation: drawer-slide-in 0.25s ease-out;
}

.modal-panel--drawer .form-field {
  margin-bottom: 10px;
}

.modal-panel--drawer .input,
.modal-panel--drawer .select {
  height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.modal-panel--drawer .form-row--2 {
  gap: 12px;
}

.modal-panel--drawer .sub-form__field-full {
  margin-bottom: 10px;
}

.modal-panel--drawer .sub-form .form-row--2 {
  margin-bottom: 10px;
}

.modal-panel--drawer .sub-form .form-actions {
  margin-top: 10px;
  padding-top: 10px;
}

.modal-panel--drawer .sub-form__section-title {
  margin: 4px 0 2px;
  padding-bottom: 2px;
  border-bottom: none;
}

.modal-panel--drawer .sub-form .form-field label,
.modal-panel--drawer .sub-form .sub-form__field-full label {
  margin-bottom: 3px;
}

.modal-panel--drawer .date-range-split__row {
  height: 34px;
  font-size: 13px;
}

.modal-panel--drawer .modal-header {
  margin-bottom: 12px;
  padding: 0;
}

.modal-panel .form-actions {
  justify-content: flex-start;
}

@keyframes drawer-slide-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

/* ------------------------------------------------------------------
   KPI CUSTOMIZE MODAL
   ------------------------------------------------------------------ */

.kpi-customize-section {
  margin-bottom: 20px;
}

.kpi-customize-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #888);
  margin: 0 0 8px;
}

.kpi-customize-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kpi-customize-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: var(--border-standard);
  background: var(--bg);
  font-size: 13px;
}

.kpi-customize-item--active {
  background: var(--light-hover, #f1f5f9);
}

.kpi-customize-label {
  font-size: 13px;
  color: var(--black);
}

.kpi-customize-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 12px;
  padding: 0;
  line-height: 1;
}

.kpi-customize-remove:hover {
  color: var(--danger);
}

/* ------------------------------------------------------------------
   RECORDING MODAL (restyled)
   ------------------------------------------------------------------ */

.recording-modal {
  background: var(--gray-50);
  max-width: 440px;
}

.recording-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.recording-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
}

.recording-modal__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg);
  border: var(--border-standard);
  border-radius: var(--radius);
  overflow: hidden;
}

.recording-modal__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: var(--border-standard);
}

.recording-modal__item:last-child {
  border-bottom: none;
}

.recording-modal__item-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.recording-modal__item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
}

.recording-modal__item-date {
  font-size: 11px;
  color: var(--gray-400);
}

.recording-modal__empty {
  font-size: 13px;
  color: var(--gray-400);
  padding: 8px 0;
}

/* Inline add form at bottom */

.recording-modal__add {
  margin-top: 16px;
  padding-top: 14px;
  border-top: var(--border-standard);
}

.recording-modal__add-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recording-modal__add-input {
  flex: 1;
  height: 34px;
  font-size: 13px;
  padding: 6px 10px;
}

.recording-modal__add-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  flex-shrink: 0;
}

/* Drawer variant for KPI customize */

.kpi-customize-list--drawer {
  flex-direction: column;
  gap: 0;
}

.kpi-customize-item--row:last-child {
  border-bottom: none;
}

.kpi-customize-add {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-blue);
  font-size: 13px;
  padding: 0;
  text-decoration: underline;
}

/* Drag handle */

.kpi-customize-handle {
  cursor: grab;
  color: var(--text-muted, #9ca3af);
  font-size: 16px;
  flex-shrink: 0;
  user-select: none;
  line-height: 1;
  letter-spacing: 2px;
}

.kpi-customize-handle:active {
  cursor: grabbing;
}

/* Drag states */

.kpi-customize-item.dragging {
  opacity: 0.4;
  background: var(--light-hover, #f1f5f9);
}

.kpi-customize-item.drag-over {
  border-top: 2px solid var(--text-blue, #3b82f6);
}

/* Toggle switch (CSS-only) */

.kpi-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

.kpi-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.kpi-toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 20px;
  transition: background 0.2s;
}

.kpi-toggle__slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  bottom: 2px;
  background: var(--bg);
  border-radius: 50%;
  transition: transform 0.2s;
}

.kpi-toggle input:checked + .kpi-toggle__slider {
  background: var(--text-blue, #3b82f6);
}

.kpi-toggle input:checked + .kpi-toggle__slider::before {
  transform: translateX(16px);
}

/* Tabs inside KPI modal */

.kpi-customize-tabs {
  display: flex;
  gap: 0;
  border-bottom: var(--border-standard);
  margin-bottom: 16px;
  padding: 0 4px;
}

.kpi-customize-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #888);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.kpi-customize-tab:hover {
  color: var(--black);
}

.kpi-customize-tab--active {
  color: var(--black);
  border-bottom-color: var(--text-blue, #3b82f6);
}

/* Row layout with handle + label + toggle */

.kpi-customize-item--row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 0;
  border: none;
  border-bottom: var(--border-standard);
  padding: 10px 4px;
}

.kpi-customize-item--row .kpi-customize-label {
  flex: 1;
}
/* ------------------------------------------------------------------
   AUTH LAYOUT
   ------------------------------------------------------------------ */

.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  width: var(--auth-width);
  max-width: 100%;
  padding: 32px;
  border: var(--border-standard);
  border-radius: var(--radius);
  background: var(--bg);
}

/* ------------------------------------------------------------------
   AUTH FOOTER (bottom paragraph shared across all auth pages)
   ------------------------------------------------------------------ */

.auth-footer {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
/* ------------------------------------------------------------------
   APP LAYOUT
   ------------------------------------------------------------------ */

.app-shell {
  min-height: 100vh;
  background: var(--bg);
}

.app-layout {
  display: flex;
  min-height: calc(100vh - 49px);
  position: relative;
}

/* ---------------------------------------------
   MAIN AREA
   --------------------------------------------- */

.app-main {
  flex: 1;
  padding: 0 0 24px;
  overflow-x: auto;
  background: var(--bg);
}


/* ------------------------------------------------------------------
   PAGE SHELL & HEADERS
   ------------------------------------------------------------------ */

.page-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-top: 16px;
}

.page-card {
  background: var(--bg);
  border-radius: 0;
  border: none;
  padding: 0;
  box-shadow: none;
}

.page-card--scroll {
  overflow-x: auto;
}

/* ---------------------------------------------
   PAGE HEADER (title + top buttons)
   --------------------------------------------- */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 24px;
}


.page-subtitle {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.page-subtitle--inline {
  font-weight: 400;
  color: var(--black);
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Back link — small text with arrow */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.15s;
  padding: 0 24px;
  margin-bottom: 8px;
}

.back-link:hover {
  color: var(--gray-600);
}

.back-link__arrow {
  font-size: 12px;
  line-height: 1;
}

.page-header h2 {
  margin: 0;
}

.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-blue);
}

.section-title {
  margin: 16px 0 12px;
  font-size: 16px;
  font-weight: 600;
}

/* ------------------------------------------------------------------
   TEXT LINK (generic inline link, reusable app-wide)
   ------------------------------------------------------------------ */

.text-link {
  color: var(--text-blue);
  text-decoration: none;
  cursor: pointer;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-link--btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}

.text-link--danger {
  color: var(--red, #e53e3e);
}

.text-link--danger:hover {
  color: var(--red-dark, #c53030);
}
/* ------------------------------------------------------------------
   STEP INDICATOR (onboarding flow)
   ------------------------------------------------------------------ */

.step-indicator {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 24px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--gray-200);
  color: var(--gray-400);
  background: var(--bg);
  box-sizing: border-box;
}

.step-label {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 11px 4px 0;
}

.step--active .step-dot {
  border-color: var(--text-blue);
  color: var(--text-blue);
  background: var(--card);
}

.step--active .step-label {
  color: var(--text-blue);
  font-weight: 600;
}

.step--done .step-dot {
  border-color: var(--text-blue);
  background: var(--text-blue);
  color: var(--bg);
}

.step--done .step-label {
  color: var(--text-blue);
}

.step--pending .step-dot {
  border-color: var(--gray-200);
  color: var(--gray-400);
}

.step--pending .step-label {
  color: var(--muted);
}
.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{/*
      /*rtl:begin:ignore*/left:0/*
      /*rtl:end:ignore*/}/*
      /*rtl:begin:ignore*/
/*
      /*rtl:end:ignore*/
.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{/*
      /*rtl:begin:ignore*/right:0/*
      /*rtl:end:ignore*/}/*
      /*rtl:begin:ignore*/
/*
      /*rtl:end:ignore*/
.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer + .dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}
/* ------------------------------------------------------------------
   Flatpickr (date range picker) – match HTS UI
   ------------------------------------------------------------------ */

.flatpickr-calendar {
  font-family: inherit !important;
  border-radius: 10px !important;
  border: var(--border-standard) !important;
  box-shadow: none !important;
}

.flatpickr-months .flatpickr-month {
  font-size: 13px;
}

.flatpickr-weekday {
  font-size: 11px;
  color: #9ca3af;
}

.flatpickr-day {
  border-radius: 6px;
  background: transparent !important;
}

.flatpickr-innerContainer,
.flatpickr-rContainer,
.flatpickr-days,
.dayContainer {
  background: transparent !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--text-blue) !important;
  border-color: var(--text-blue) !important;
  color: #ffffff !important;
}

.flatpickr-day.inRange {
  background: #eeedff !important;
  border-color: #eeedff !important;
  box-shadow: -5px 0 0 #eeedff, 5px 0 0 #eeedff !important;
  border-radius: 0 !important;
  color: var(--text-blue) !important;
}

.flatpickr-day.startRange {
  box-shadow: 5px 0 0 #eeedff !important;
}

.flatpickr-day.endRange {
  box-shadow: -5px 0 0 #eeedff !important;
}

.flatpickr-day.today {
  border-color: var(--text-blue) !important;
}

.flatpickr-day:hover {
  background: rgba(72, 62, 255, 0.15) !important;
  border-color: rgba(72, 62, 255, 0.15) !important;
}

/* Flatpickr range calendar with embedded shortcuts (filter bar) */
.flatpickr-calendar:has(.ds__shortcuts) {
  width: auto !important;
}

/* ------------------------------------------------------------------
   Date-shortcut popover (calendar + quick-pick side panel)
   ------------------------------------------------------------------ */

.ds__popover {
  position: absolute;
  bottom: 100%;
  left: 0;
  z-index: 60;
  display: flex;
  background: var(--bg);
  border: var(--border-standard);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  margin-bottom: 4px;
}

.ds__calendar {
  flex: 0 0 auto;
}

.ds__calendar .flatpickr-calendar {
  border: none !important;
  box-shadow: none !important;
  border-radius: 10px 0 0 10px !important;
}

.ds__shortcuts {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-left: var(--border-standard);
  min-width: 110px;
  justify-content: center;
  gap: 2px;
}

.ds__shortcut-link {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  color: var(--gray-600);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.ds__shortcut-link:hover {
  color: var(--text-blue);
}

.ds__custom-wrapper {
  margin-top: 4px;
  padding-top: 4px;
  border-top: var(--border-standard);
}

.ds__custom-input {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ds__custom-number {
  width: 44px;
  padding: 3px 6px;
  border: var(--border-standard);
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
}

.ds__custom-number:focus {
  outline: none;
  border-color: var(--text-blue);
}

.ds__custom-label {
  font-size: 12px;
  color: var(--gray-500);
}
/* --------------------------------------------------
   SIDEBAR (fixed, no collapse)
   -------------------------------------------------- */

.sidebar {
  width: 130px;
  background: linear-gradient(180deg, #0c1228 0%, #0c1228 70%, #111640 85%, #171d55 95%, #1e2468 100%);
  border-right: var(--border-standard);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
}

.sidebar-header {
  padding: 16px 18px;
}

/* Org switcher */
.org-switcher__select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--black);
  border: none;
  border-radius: 0;
  padding: 6px 28px 6px 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.org-switcher__select:hover {
  border-color: var(--gray-400);
  background-color: var(--gray-50);
}

.org-switcher__select:focus {
  border-color: var(--text-blue);
}

.org-switcher__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav – no horizontal padding so backgrounds can touch edges */
.sidebar-nav {
  padding: 16px 0 16px;
  /* top/bottom only */
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: block;
  width: 100%;
  padding: 8px 18px;
  text-decoration: none;
  font-size: 14px;
  color: #d7d7d7;
  border-radius: 0;
  transition: background 0.16s ease, color 0.16s ease;
  box-sizing: border-box;
}

.sidebar-link:not(.sidebar-link--active):hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-link--active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 500;
}

.sidebar-link--active:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: default;
}

/* --------------------------------------------------
   SETTINGS LAYOUT (secondary sidebar)
   -------------------------------------------------- */

.settings-layout {
  display: flex;
  min-height: calc(100vh - 49px);
}

.settings-sidebar {
  width: 180px;
  min-width: 180px;
  background: #f8f8f8;
  border-right: var(--border-standard);
  padding: 20px 0;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav__link {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.settings-nav__link:hover {
  background: #efefef;
  color: var(--black);
}

.settings-nav__link--active {
  background: #e8e8e8;
  color: var(--black);
  font-weight: 500;
}

.settings-content {
  flex: 1;
  overflow-x: auto;
}

/* ------------------------------------------------------------------
   TOP BAR (user info)
   ------------------------------------------------------------------ */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 14px;
  height: 48px;
  border-bottom: var(--border-standard);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  padding-left: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-user {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--black);
  font-size: 13px;
}

.topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--light-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-blue);
  margin-right: 8px;
}

.topbar-user-name {
  font-weight: 500;
  font-size: 13px;
}

/* Settings link pinned to sidebar bottom */
.sidebar-link--bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-link__icon {
  flex-shrink: 0;
}

/* ------------------------------------------------------------------
   PAGE TABS (call type switcher on dashboard etc.)
   ------------------------------------------------------------------ */

.nav-tabs {
  display: flex;
  gap: 16px;
  padding: 8px 24px 0;
  border-bottom: var(--border-standard);
}

.nav-tab {
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #888);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-tab:hover {
  color: var(--black);
}

.nav-tab--active {
  color: var(--black);
  border-bottom-color: var(--text-blue);
}

.nav-tabs__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nav-tab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #fee2e2;
  border: 1px solid #fee2e2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  line-height: 1;
}

/* Success badge variant (green) */
.nav-tab__badge--success {
  background: #e7f9ee;
  border-color: #e7f9ee;
  color: #166534;
}
/* ------------------------------------------------------------------
   STATUS BADGE (read-only pill — shared base)
   ------------------------------------------------------------------ */

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: capitalize;
  white-space: nowrap;
}

/* ------------------------------------------------------------------
   STATUS SELECT (interactive dropdown — shared base)
   ------------------------------------------------------------------ */

.status-select {
  width: 100%;
  max-width: 110px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: capitalize;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  box-shadow: none;

  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
}

.status-select::-ms-expand { display: none; }
.status-select:focus,
.status-select:focus-visible { outline: none; box-shadow: none; }

.status-form-cell form {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ------------------------------------------------------------------
   COLORS — shared across badge + select
   Green family   → positive (closed, paid, active, demo_booked)
   Yellow family  → warning  (pending, paused, pipeline, followup)
   Red family     → negative (lost, failed, no_show, unqualified, cancelled)
   Purple family  → neutral  (rescheduled)
   Gray family    → muted    (completed, refunded, inactive, removed)
   Blue family    → info     (booked, invited)
   ------------------------------------------------------------------ */

/* --- Green --- */
.status--closed,
.status--paid,
.status--active,
.status--demo_booked {
  background-color: #e7f9ee;
  border: var(--border-standard);
  color: #166534;
}

/* --- Yellow --- */
.status--pending,
.status--paused,
.status--pipeline,
.status--followup,
.status--no_product {
  background-color: #fef9c3;
  border: var(--border-standard);
  color: #92400e;
}

/* --- Red --- */
.status--lost,
.status--failed,
.status--no_show,
.status--unqualified,
.status--cancelled,
.status--overdue {
  background-color: #fee2e2;
  border: var(--border-standard);
  color: #991b1b;
}

/* --- Purple --- */
.status--rescheduled {
  background-color: #f5ecff;
  border: var(--border-standard);
  color: #6b21a8;
}

/* --- Blue --- */
.status--booked,
.status--invited {
  background-color: #f3f3ff;
  border: var(--border-standard);
  color: var(--text-blue);
}

/* --- Gray --- */
.status--completed,
.status--refunded,
.status--inactive,
.status--removed,
.status--suspended,
.status--canceled_by_lead {
  background-color: #f3f4f6;
  border: var(--border-standard);
  color: #6b7280;
}

.status--refunded {
  text-decoration: line-through;
}

/* --- Roles (team) --- */
.status--owner {
  background-color: #f3f3ff;
  border: var(--border-standard);
  color: var(--text-blue);
}

.status--admin {
  background-color: #f5ecff;
  border: var(--border-standard);
  color: #6b21a8;
}

.status--sales {
  background-color: #e7f9ee;
  border: var(--border-standard);
  color: #166534;
}

.status--setter {
  background-color: #fef9c3;
  border: var(--border-standard);
  color: #92400e;
}

.status--csm {
  background-color: #dbeafe;
  border: var(--border-standard);
  color: #1e40af;
}

.lead-or {
  align-self: center;
  color: var(--muted);
  font-size: var(--font-sm);
  margin: 0 6px;
}
/* ------------------------------------------------------------------
   READ OPERATIONS & QUERY UI (Filters)
   ------------------------------------------------------------------ */

.filters-block {
    padding-top: 30px;
    padding-bottom: 30px;
}

.filter-row-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 0px;
    padding: 0 24px;
}

.filter-row-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 0px;
    padding: 0;
}

.filter-field {
    flex: 0 0 auto;
    min-width: 100px;
    max-width: 130px;
}

.filter-field--wide {
    min-width: 182px;
    max-width: 252px;
}

.filter-input--date-range,
.filter-input--date-range + .flatpickr-input.active + input.form-control {
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: var(--black);
    letter-spacing: 0.01em;
}

/* Flatpickr creates an altInput — style it too */
input.flatpickr-input + input {
    font-size: 11px !important;
}

.filter-label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: 500;
}

.filter-section-wrapper {
    padding: 0;
    border: none;
    background: transparent;
}

.filter-input {
    width: 100%;
    padding: 6px 10px;
    border: var(--border-standard);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    height: 34px;
    box-sizing: border-box;
    background-color: var(--bg);
}

.filter-input:focus {
    border-color: var(--primary-dark);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

select.filter-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 32px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Search bar ---------- */

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
}

.search-bar__input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px 6px 30px;
  border: var(--border-standard);
  border-radius: 6px;
  font-size: 13px;
  height: 34px;
  box-sizing: border-box;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}

.search-bar__input:focus {
  border-color: var(--primary-dark);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
/* ------------------------------------------------------------------
   PAYMENTS — Utility classes used in payment views
   ------------------------------------------------------------------ */

.text-success {
  color: var(--success);
  font-weight: 500;
}

.text-danger {
  color: var(--danger);
  font-weight: 500;
}
/* components.css*/

.label-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
}

.label-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.label-list__swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.empty-state-text {
  font-size: 13px;
  color: var(--text-muted, #888);
  padding: 8px 0;
}

.label-list__form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-list__input {
  padding: 6px 8px;
  border: var(--border-standard);
  border-radius: 6px;
  font-size: 13px;
  height: 32px;
  box-sizing: border-box;
  width: 160px;
}

/* Call type badge */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.badge--sales {
  background-color: #f0f0ff;
  color: var(--text-blue);
}

.badge--qualification {
  background-color: #fff8eb;
  color: #92600a;
}

/* ------------------------------------------------------------------
   CONTACT SHOW — Top layout (card + products side by side)
   ------------------------------------------------------------------ */

.contact-show__top {
  display: flex;
  gap: 16px;
  padding: 0 24px;
  margin-bottom: 0;
}

.contact-show__products {
  width: 320px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .contact-show__top {
    flex-direction: column;
  }
}

/* ------------------------------------------------------------------
   CONTACT CARD — Compact info card (left column)
   ------------------------------------------------------------------ */

.contact-card {
  width: 260px;
  flex-shrink: 0;
  background: var(--gray-50);
  border: var(--border-standard);
  border-radius: var(--radius);
  padding: 20px;
}

.contact-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.contact-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text-blue);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}

.contact-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.2;
}

.contact-card__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-card__field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
}

.contact-card__icon {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-400);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.contact-card__icon-svg {
  color: var(--gray-400);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.contact-card__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-400);
}

.contact-card__value {
  color: var(--black);
  font-size: 13px;
}

.contact-card__value--muted {
  color: var(--gray-500);
}

.contact-card__notes {
  margin-top: 14px;
  padding-top: 12px;
  border-top: var(--border-standard);
}

.contact-card__notes-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

.contact-card__notes-text {
  font-size: 13px;
  color: var(--gray-700);
  margin: 4px 0 0;
  line-height: 1.4;
}

/* Inline edit inputs (hidden by default) */

.contact-card__input {
  flex: 1;
  min-width: 0;
  padding: 3px 6px;
  font-size: 13px;
  border: var(--border-standard);
  border-radius: 4px;
  background: var(--bg);
  font-family: inherit;
}

.contact-card__input:focus {
  outline: none;
  border-color: var(--text-blue);
}

.contact-card__textarea {
  width: 100%;
  min-height: 60px;
  padding: 6px 8px;
  font-size: 13px;
  border: var(--border-standard);
  border-radius: 4px;
  background: var(--bg);
  font-family: inherit;
  resize: vertical;
  margin-top: 4px;
}

.contact-card__textarea:focus {
  outline: none;
  border-color: var(--text-blue);
}

/* Footer — Edit left, Delete right */

.contact-card__footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: var(--border-standard);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-card__footer-link {
  font-size: 12px;
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.15s;
}

.contact-card__footer-link:hover {
  text-decoration: underline;
  color: var(--gray-500);
}

.contact-card__footer-link--save {
  color: var(--text-blue);
}

.contact-card__footer-link--save:hover {
  color: var(--text-blue);
}

.contact-card__footer-link--danger {
  color: #e8a0a0;
}

.contact-card__footer-link--danger:hover {
  color: var(--danger);
}

.contact-card__footer-link--danger:hover {
  color: var(--danger);
}

/* Contact show — calls section (full width below top row) */

.contact-show__calls {
  margin-top: 16px;
  padding: 0 24px;
}

/* Section header inside contact show cards — no extra top margin */

.contact-show__section-header {
  margin-bottom: 12px;
}

.contact-show__section-header .detail-view__section-title {
  margin: 0;
}

/* Contact show panel — bordered card for tables */

.contact-show__panel {
  border: var(--border-standard);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--gray-50);
}

.contact-show__panel .table {
  border: var(--border-standard);
  border-radius: var(--radius);
  background: var(--bg);
}

.contact-show__panel .table thead {
  background: var(--bg);
}

.contact-show__panel .table th {
  color: var(--gray-500);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: var(--border-standard);
}

.contact-show__panel .table td {
  border-bottom: var(--border-standard);
}

.contact-show__panel .table tbody tr:last-child td {
  border-bottom: none;
}

/* Reminder badge (calls table) */

.reminder-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background-color: var(--card);
  border: var(--border-standard);
  color: var(--text-blue);
  cursor: default;
  white-space: nowrap;
}
/* ------------------------------------------------------------------
   DETAIL VIEW — Generic show-page component
   Usage: .detail-view > .detail-view__grid > .detail-view__item
   ------------------------------------------------------------------ */

.detail-view {
  padding: 20px 24px;
}

.detail-view__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
}

@media (max-width: 768px) {
  .detail-view__grid {
    grid-template-columns: 1fr;
  }
}

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

.detail-view__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

.detail-view__value {
  font-size: 14px;
  color: var(--black);
}

.detail-view__section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: var(--border-standard);
}

.detail-view__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.detail-view__section-header .detail-view__section-title {
  margin-bottom: 0;
}

.detail-view__section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 16px;
}

.detail-view__actions {
  display: flex;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: var(--border-standard);
}
/* ------------------------------------------------------------------
   COMBOBOX (autocomplete search select)
   ------------------------------------------------------------------ */

.combobox {
  position: relative;
}

.combobox__list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg);
  border: var(--border-standard);
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.combobox__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
}

.combobox__option:hover,
.combobox__option--active {
  background: var(--light-hover);
}

.combobox__option-text {
  font-weight: 500;
  color: var(--gray-800);
}

.combobox__option-sub {
  color: var(--gray-400);
  font-size: 12px;
}

.combobox__empty {
  padding: 10px;
  font-size: 13px;
  color: var(--gray-400);
  text-align: center;
}
/* ------------------------------------------------------------------
   SUBSCRIPTIONS
   ------------------------------------------------------------------ */

/* ---------- Form (new / edit) ---------- */

.sub-form {
  padding: 20px 24px 24px;
  max-width: 500px;
  margin: 0 auto;
  border: var(--border-standard);
  border-radius: var(--radius);
}

.modal-panel .sub-form {
  border: none;
  padding: 0 16px;
  max-width: none;
}

.sub-form__field-full {
  max-width: none;
  margin-bottom: 14px;
}

.sub-form .form-row--2 {
  margin-bottom: 14px;
  column-gap: 10px;
}

.sub-form .form-field {
  max-width: none;
}

.sub-form .form-field label,
.sub-form .sub-form__field-full label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-700);
  margin-bottom: 5px;
  text-align: left;
}

.sub-form .input,
.sub-form .select {
  padding: 8px 10px;
  font-size: 14px;
  height: 36px;
  text-align: left;
  border-color: var(--text-blue);
}

.sub-form .input::placeholder {
  color: var(--gray-400);
  opacity: 1;
}

/* Section titles (Program Duration) */
.sub-form__section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-700);
  margin: 20px 0 8px;
  padding-bottom: 4px;
  border-bottom: var(--border-standard);
  text-align: left;
}

.sub-form .form-actions {
  margin-top: 20px;
  padding-top: 14px;
  border-top: var(--border-standard);
  justify-content: flex-end;
}

/* Date range split (two clickable dates with arrow) */

.date-range-split__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--text-blue);
  border-radius: 6px;
  font-size: 14px;
  height: 36px;
  box-sizing: border-box;
  background: var(--bg);
}

.date-range-split__date {
  cursor: pointer;
  color: var(--gray-800);
  font-weight: 500;
}

.date-range-split__date:hover {
  color: var(--text-blue);
}

.date-range-split__arrow {
  color: var(--gray-400);
  font-size: 14px;
}

/* ---------- Payment preview (one-off form) ---------- */

.payment-preview__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.payment-preview__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  font-size: 13px;
}

.payment-preview__item:last-child {
  border-bottom: none;
}

.payment-preview__number {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-blue, #3b82f6);
  flex-shrink: 0;
}

.payment-preview__date {
  flex: 1;
  color: var(--gray-700, #374151);
}

.payment-preview__amount {
  font-weight: 600;
  color: var(--black, #111);
}

/* ---------- Show page (compact table) ---------- */

.sub-show {
  padding: 20px 24px;
}

.sub-show__table-wrapper {
  border: var(--border-standard);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.sub-show__table {
  width: 100%;
  border-collapse: collapse;
}

.sub-show__table td {
  padding: 6px 0;
  vertical-align: middle;
  font-size: 14px;
}

/* Compact inputs for inline edit (dates, combobox, select) */
.sub-show__table .input,
.sub-show__table .select {
  max-width: 150px;
  height: 30px;
  padding: 4px 8px;
  font-size: 13px;
}

.sub-show__table .combobox .input {
  max-width: 150px;
  height: 30px;
  padding: 4px 8px;
  font-size: 13px;
}

.sub-show__table .input[readonly] {
  color: var(--black);
}

.sub-show__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  width: 90px;
  white-space: nowrap;
  padding-right: 8px;
}

.sub-show__value {
  color: var(--black);
  padding-right: 32px;
}

.sub-show__actions {
  display: flex;
  gap: 12px;
  padding: 4px 24px 12px;
  font-size: 13px;
}

/* Save/cancel inside the edit table — align with label column */
.sub-show__table-wrapper .sub-show__actions {
  padding: 12px 0 0;
  margin-top: 8px;
  border-top: var(--border-standard);
}

.sub-show__actions .text-link--danger {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  color: var(--danger);
  text-decoration: underline;
}

.sub-show__actions .text-link--danger:hover {
  color: var(--danger-hover);
}

.detail-view__section .sub-show__actions {
  padding: 0 0 8px;
}

.sub-show__notes {
  margin-top: 16px;
  padding-top: 12px;
  border-top: var(--border-standard);
}

.sub-show__notes-text {
  font-size: 14px;
  color: var(--gray-700);
  margin: 4px 0 0;
}

/* Payments section header */

.detail-view__section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payments-summary {
  font-size: 13px;
  color: var(--gray-600);
}

/* Inline edit input */

.inline-edit__input {
  font-size: 14px;
  padding: 2px 6px;
  border: 1px solid var(--text-blue);
  border-radius: 4px;
  width: 90px;
  outline: none;
}

/* Delete icon button */

.btn-icon-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
}

.btn-icon-delete:hover {
  color: var(--danger);
  background: #fef2f2;
}

/* ------------------------------------------------------------------
   SUBSCRIPTION CARD — Compact info card (show page, left column)
   ------------------------------------------------------------------ */

.sub-card {
  width: 280px;
  flex-shrink: 0;
  background: var(--gray-50);
  border: var(--border-standard);
  border-radius: var(--radius);
  padding: 20px;
}

.sub-card--editing {
  width: 280px;
}

.sub-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.sub-card__product-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.2;
}

.sub-card__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-card__field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
}

.sub-card__icon-svg {
  color: var(--gray-400);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.sub-card__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-400);
}

.sub-card__value {
  color: var(--black);
  font-size: 13px;
}

.sub-card__notes {
  margin-top: 14px;
  padding-top: 12px;
  border-top: var(--border-standard);
}

.sub-card__notes-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

.sub-card__notes-text {
  font-size: 13px;
  color: var(--gray-700);
  margin: 4px 0 0;
  line-height: 1.4;
}

.sub-card__footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: var(--border-standard);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Ensure button_to form doesn't break flex layout */
.sub-card__footer form {
  display: inline;
}

.sub-card__footer .contact-card__footer-link--danger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

/* ---------- Inline edit mode ---------- */

.sub-card__edit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-card__edit-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

.sub-card__edit-input {
  width: 100%;
  max-width: none;
  height: 32px;
  padding: 4px 8px;
  font-size: 13px;
}

.sub-card__edit-textarea {
  width: 100%;
  margin-top: 0;
}

.sub-card .combobox__list {
  max-width: 240px;
}

/* Save button styled as a link */
.sub-card__save-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

/* Payments panel — bordered card matching subscription card */
.payments-panel {
  border: var(--border-standard);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg);
}

.payments-panel .table {
  width: calc(100% + 40px);
  margin-left: -20px;
  margin-right: -20px;
  border-radius: 0;
  border-left: none;
  border-right: none;
  background: var(--bg);
}

.payments-panel .table thead {
  background: var(--bg);
}

.payments-panel .table th {
  color: var(--gray-500);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: var(--border-standard);
}

.payments-panel .table td {
  border-bottom: var(--border-standard);
}

.payments-panel .table tbody tr:last-child td {
  border-bottom: none;
}

/* Payments table footer — Edit / Save+Add+Cancel */
.payments-table__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0 0;
  margin-top: 4px;
}

/* Row marked for deletion */
.payment-row--deleted {
  opacity: 0.35;
  text-decoration: line-through;
}
/* ------------------------------------------------------------------
   RECORDING SHOW PAGE
   ------------------------------------------------------------------ */

/* Audio player */
.recording-player {
  width: 100%;
  margin-top: 8px;
  border-radius: var(--radius);
}

.recording-player audio {
  width: 100%;
  height: 40px;
  border-radius: var(--radius);
}

/* Comments thread */
.recording-comments {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recording-comments__empty {
  font-size: 13px;
  color: var(--gray-400);
  padding: 8px 0;
}

/* Single comment bubble — other users (left) */
.comment-bubble {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 75%;
}

.comment-bubble__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card);
  color: var(--text-blue);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.comment-bubble__content {
  flex: 1;
  min-width: 0;
}

.comment-bubble__header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-bubble__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
}

.comment-bubble__time {
  font-size: 11px;
  color: var(--gray-400);
}

.comment-bubble__body {
  background: var(--card);
  border-radius: 0 12px 12px 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--black);
  line-height: 1.5;
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
}


/* Comment input bar */
.comment-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: var(--border-standard);
  max-width: 600px;
}

.comment-input-bar .input {
  flex: 1;
  border-radius: 20px;
  padding: 8px 16px;
  min-height: 38px;
  font-size: 14px;
}

.comment-input-bar__textarea {
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  font-family: inherit;
  max-height: 150px;
  overflow-y: auto;
}

.comment-input-bar__send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--text-blue);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.comment-input-bar__send:hover {
  background: var(--button-hover);
}

.comment-input-bar__send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Comments panel — bordered card on the right */
.recording-comments-panel {
  border: var(--border-standard);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg);
}

.recording-comments-panel .comment-input-bar {
  max-width: none;
}
/* ------------------------------------------------------------------
   INTEGRATIONS
   ------------------------------------------------------------------ */

.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.integration-card {
  background: var(--white);
  border: var(--border-standard);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.integration-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.integration-card__name {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.integration-card__description {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.integration-card__actions {
  display: flex;
  gap: 8px;
}

/* -- Calendly settings page -- */

.integration-status-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.integration-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.section-description {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin: 0 0 16px;
}

/* -- Webhook payload -- */

.webhook-payload {
  background-color: #1e1e2e;
  color: #cdd6f4;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-value--error {
  color: #991b1b;
}

/* -- Hyros Event Mappings -- */

.event-mappings {
  margin-top: 8px;
}

.event-mappings__group {
  margin-bottom: 20px;
}

.event-mappings__group-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

.event-mappings__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: var(--border-standard);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.event-mappings__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--white);
}

.event-mappings__item + .event-mappings__item {
  border-top: var(--border-standard);
}

.event-mappings__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Toggle switch button */

.event-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.event-toggle__track {
  display: inline-block;
  width: 40px;
  height: 22px;
  background: #d1d5db;
  border-radius: 11px;
  position: relative;
  transition: background 0.2s ease;
}

.event-toggle--active .event-toggle__track {
  background: var(--text-blue, #4f46e5);
}

.event-toggle__thumb {
  display: block;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.event-toggle--active .event-toggle__thumb {
  transform: translateX(18px);
}
/* ------------------------------------------------------------------
   BILLING / SETTINGS CARDS
   ------------------------------------------------------------------ */

.billing-content {
  max-width: 560px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.billing-card {
  border: var(--border-standard);
  border-radius: var(--radius);
  padding: 20px 24px;
  background: var(--bg);
}

.billing-card__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
}

.billing-card__description {
  margin: -4px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Status rows */

.billing-status {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.billing-status__row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.billing-status__label {
  font-weight: 600;
  min-width: 140px;
  color: var(--muted);
  font-size: 14px;
}

.billing-status__value {
  color: var(--gray-800);
  font-size: 14px;
}

/* Left-align buttons inside cards */

.billing-card .form-actions {
  margin-top: 16px;
  padding: 0;
  justify-content: flex-start;
}
/* ------------------------------------------------------------------
   LEADERBOARD
   ------------------------------------------------------------------ */

.leaderboard__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 16px;
}

.leaderboard__team-toggle {
  display: flex;
  gap: 6px;
}

.leaderboard__rank-by {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard__rank-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.leaderboard__rank {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-blue);
  text-align: left;
  width: 32px;
}

.leaderboard__value {
  font-weight: 600;
  font-size: 14px;
}

.leaderboard__highlight {
  background: none;
}
/* ------------------------------------------------------------------
   CSV IMPORT (full page layout)
   ------------------------------------------------------------------ */

/* Content wrapper (padding inside page-card) */

.csv-import__content {
  padding: 24px;
}

/* Upload step */

.csv-import__form-section {
  max-width: 480px;
}

.csv-import__field {
  margin-bottom: 16px;
}

.csv-import__hint {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin-top: 4px;
}

.csv-import__template-link {
  margin-bottom: 16px;
}

.csv-import__template-link .text-link {
  font-size: 13px;
}

/* Actions bar (shared across steps) */

.csv-import__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: var(--border-standard);
}

/* Preview step */

.csv-import__row-count {
  font-size: 13px;
  color: var(--text-muted, #888);
  margin-bottom: 12px;
}

.csv-import__preview-wrapper {
  overflow-x: auto;
  margin-bottom: 16px;
  border: var(--border-standard);
  border-radius: var(--radius);
}

.csv-import__preview-table {
  min-width: 100%;
  font-size: 13px;
}

.csv-import__preview-table th {
  vertical-align: top;
  padding: 10px 8px;
  min-width: 160px;
}

.csv-import__preview-table td {
  font-size: 12px;
  color: var(--text-muted, #888);
  padding: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.csv-import__original-header {
  font-size: 11px;
  color: var(--text-muted, #888);
  margin-bottom: 4px;
  font-weight: 400;
}

.csv-import__mapping-select {
  font-size: 12px;
  height: 32px;
  padding: 4px 6px;
}

/* Status mapping */

.csv-import__status-mapping {
  margin-top: 20px;
  margin-bottom: 16px;
}

.csv-import__section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.csv-import__status-table {
  max-width: 500px;
  font-size: 13px;
}

.csv-import__status-value {
  font-weight: 500;
  margin-right: 8px;
}

.csv-import__status-badge--matched {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 10px;
  background: #dcfce7;
  color: #16a34a;
}

.csv-import__status-badge--unmatched {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 10px;
  background: #fef3c7;
  color: #d97706;
}

/* Warnings */

.csv-import__warnings {
  margin-bottom: 12px;
}

.csv-import__warning {
  font-size: 12px;
  color: var(--danger);
  padding: 4px 0;
}

/* Results step */

.csv-import__results {
  margin-bottom: 16px;
}

.csv-import__summary {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.csv-import__stat {
  flex: 1;
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--radius);
  border: var(--border-standard);
  max-width: 200px;
  background: var(--bg, #fff);
}

.csv-import__stat-number {
  display: block;
  font-size: 28px;
  font-weight: 700;
}

.csv-import__stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted, #888);
  margin-top: 4px;
}

.csv-import__stat--success {
  background: #f0fdf4;
}

.csv-import__stat--success .csv-import__stat-number {
  color: #16a34a;
}

.csv-import__stat--skipped {
  background: #fffbeb;
}

.csv-import__stat--skipped .csv-import__stat-number {
  color: #d97706;
}

.csv-import__stat--error {
  background: #fef2f2;
}

.csv-import__stat--error .csv-import__stat-number {
  color: var(--danger);
}

/* Error list */

.csv-import__error-list {
  max-height: 400px;
  overflow-y: auto;
  border: var(--border-standard);
  border-radius: var(--radius);
}

.csv-import__error-title {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  margin: 0;
  border-bottom: var(--border-standard);
}

.csv-import__error-list .table {
  font-size: 13px;
  margin: 0;
}

.csv-import__export-failed {
  margin-top: 12px;
}

/* Dropdown (new button with import option) */

.csv-import__dropdown {
  position: relative;
  display: inline-block;
}

.csv-import__dropdown-caret {
  font-size: 10px;
  margin-left: 2px;
}

.csv-import__dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--bg);
  border: var(--border-standard);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  z-index: 50;
  min-width: 160px;
  overflow: hidden;
}

.csv-import__dropdown-item {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--black);
  text-decoration: none;
  white-space: nowrap;
}

.csv-import__dropdown-item:hover {
  background: var(--light-hover, #f1f5f9);
}
/* ------------------------------------------------------------------
   ADMIN LAYOUT
   ------------------------------------------------------------------ */

/* Topbar elements */
.admin-topbar__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0.02em;
}

.admin-topbar__back {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.admin-topbar__back:hover {
  color: var(--black);
}

/* ------------------------------------------------------------------
   ADMIN SIDEBAR
   ------------------------------------------------------------------ */

.admin-sidebar {
  width: 130px;
  background: #2d1b2e;
  border-right: 1px solid #3d2a3e;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
}

.admin-sidebar__nav {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-sidebar__link {
  display: block;
  width: 100%;
  padding: 8px 18px;
  text-decoration: none;
  font-size: 14px;
  color: #d7c8d8;
  border-radius: 0;
  transition: background 0.16s ease, color 0.16s ease;
  box-sizing: border-box;
}

.admin-sidebar__link:not(.admin-sidebar__link--active):hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.admin-sidebar__link--active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 500;
}

.admin-sidebar__link--active:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: default;
}

/* ------------------------------------------------------------------
   ADMIN MAIN CONTENT
   ------------------------------------------------------------------ */

.admin-main {
  flex: 1;
  padding: 0 0 24px;
  overflow-x: auto;
  background: var(--bg);
}

/* ------------------------------------------------------------------
   ADMIN STAT GRID & CARDS
   ------------------------------------------------------------------ */

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 24px;
}

.admin-stat-card {
  background: #f8f8f8;
  border: var(--border-standard);
  border-radius: 6px;
  padding: 20px;
}

.admin-stat-card__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

.admin-stat-card__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
  margin: 0;
  line-height: 1.2;
}

/* ------------------------------------------------------------------
   IMPERSONATION STOP BUTTON (inside topbar)
   ------------------------------------------------------------------ */

.impersonation-banner__stop {
  display: inline-block;
  padding: 4px 12px;
  background: var(--danger);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.impersonation-banner__stop:hover {
  opacity: 0.9;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 */

/*



























 */
