/**
 * wz-partials.css
 * ─────────────────────────────────────────────────────────
 * Workzuite Design System — Partial Component Classes
 * Aligned to design-review.html token definitions
 * ─────────────────────────────────────────────────────────
 *
 * Components:
 *   wz-modal-*      Modal dialog
 *   wz-empty-*      Empty state
 *   wz-toast-*      Toast notification
 *   wz-pagination-* Pagination controls
 *   wz-toolbar-*    Index page toolbar
 *   wz-viewheader-* Record view page header
 *   wz-bulk-*       Bulk action bar
 *   wz-timeline-*   Activity timeline
 */


/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS — match design-review.html :root
   ═══════════════════════════════════════════════════════════ */
:root {
  --wz-primary:        #017AE4;
  --wz-primary-dark:   #0165CC;
  --wz-secondary:      #67B247;
  --wz-secondary-dark: #4F9433;
  --wz-alt:            #0E2340;
  --wz-error:          #EF4444;
  --wz-success:        #16A34A;
  --wz-warning:        #D97706;
  --wz-info:           #0284C7;

  --text-primary:    #0F172A;
  --text-secondary:  #334155;
  --text-muted:      #64748B;
  --text-faint:      #94A3B8;

  --surface:         #FFFFFF;
  --bg-page:         #F5F7FA;
  --bg-subtle:       #F8FAFC;
  --border:          #E8ECF1;
  --border-subtle:   #F1F5F9;
  --border-input:    #E2E8F0;

  --card-radius:  16px;
  --btn-radius:   5px;
  --input-radius: 8px;
  --modal-radius: 0px;
}


/* ═══════════════════════════════════════════════════════════
   FORM CONTROLS — wz-input, wz-label, wz-select
   ═══════════════════════════════════════════════════════════ */

.wz-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.wz-label .required { color: var(--wz-error); }

/* Uppercase variant for index-style forms */
.wz-label-caps {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.wz-label-caps .required { color: var(--wz-error); }

.wz-input {
  width: 100%; height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-input);
  border-radius: var(--input-radius);
  font-size: 13.5px; font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-subtle);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
  font-family: inherit;
}
.wz-input:focus {
  border-color: var(--wz-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(1, 122, 228, 0.1);
}
.wz-input::placeholder { color: var(--text-faint); }
textarea.wz-input { height: auto; padding: 10px 12px; resize: vertical; }
select.wz-input {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: var(--bg-subtle);
  padding-right: 2.25rem;
  cursor: pointer;
}

/* Icon input group: wrapper + icon + padded input */
.wz-input-group {
  position: relative;
}
.wz-input-group .wz-input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); font-size: 13px; pointer-events: none;
  transition: color 0.15s;
}
.wz-input-group:focus-within .wz-input-icon {
  color: var(--wz-primary);
}
/* Textarea icon sits at top */
.wz-input-group .wz-input-icon-top {
  position: absolute; left: 14px; top: 12px; transform: none;
  color: var(--text-faint); font-size: 13px; pointer-events: none;
  transition: color 0.15s;
}
.wz-input-group:focus-within .wz-input-icon-top {
  color: var(--wz-primary);
}
.wz-input-group .wz-input {
  padding-left: 40px;
}

/* URL / Prefix input group */
.wz-input-prefix-group {
  position: relative;
  display: flex;
  align-items: center;
}
.wz-input-prefix {
  position: absolute; left: 1px; top: 1px; bottom: 1px;
  display: flex; align-items: center;
  padding: 0 0 0 12px;
  font-size: 13.5px; font-weight: 400;
  color: var(--text-faint);
  pointer-events: none;
  white-space: nowrap;
  border-right: 1px solid var(--border-input);
  padding-right: 10px;
  background: var(--bg-subtle);
  border-radius: var(--input-radius) 0 0 var(--input-radius);
}
.wz-input-prefix-group .wz-input {
  padding-left: var(--wz-prefix-width, 90px);
}
.wz-input-prefix-group:focus-within .wz-input-prefix {
  color: var(--wz-primary);
  border-right-color: var(--wz-primary);
}

/* Select with left icon (non-grouped) */
.wz-input-group select.wz-input {
  padding-left: 40px;
  padding-right: 2.25rem;
}

/* Form section divider */
.wz-form-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0 4px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-faint);
}
.wz-form-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-subtle);
}


/* ═══════════════════════════════════════════════════════════
   CARDS — card-s1, card-s2, card-s3
   ═══════════════════════════════════════════════════════════ */

.card-s1, .card-s2, .card-s3 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 20px;         /* Consistent 20px all around — overrides wz-design-system.css 24px 28px */
  position: relative; overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.card-s1:hover, .card-s2:hover, .card-s3:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  border-color: #D4D9E4;
}

/* Metric card — icon badge pattern */
.wz-metric-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
/* Faded circular halo — inherits icon bg color, clipped by card-s1 overflow:hidden.
   Positioned to sink into the top-right corner of the card so edges are hidden. */
.wz-metric-icon::after {
  content: '';
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: inherit;
  top: -38px; right: -38px;
  left: auto;
  z-index: -1;
  pointer-events: none;
}
.wz-metric-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  position: relative;
  z-index: 2;
}
.wz-metric-value {
  font-size: 24px; font-weight: 800;
  color: var(--text-primary);
  margin-top: 6px;
  line-height: 1.1;
  position: relative;
  z-index: 2;
}
.wz-metric-sub {
  font-size: 12px; font-weight: 400;
  color: var(--text-faint);
  margin-top: 4px;
  position: relative;
  z-index: 2;
}

/* Active filter ring */
.card-s1.metric-active {
  border-color: var(--wz-primary);
  box-shadow: 0 0 0 3px rgba(1, 122, 228, 0.1);
}


/* ═══════════════════════════════════════════════════════════
   FILTER STRIP — wz-filter-*
   ═══════════════════════════════════════════════════════════ */

.wz-filter-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
}

.wz-filter-control {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #DDE4F0;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
select.wz-filter-control {
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.wz-filter-control:focus {
  border-color: var(--wz-primary);
  box-shadow: 0 0 0 3px rgba(1, 122, 228, 0.08);
}
input[type="date"].wz-filter-control {
  padding: 0 8px;
  min-width: 120px;
}

.wz-filter-apply {
  display: inline-flex;
  align-items: center; gap: 5px;
  height: 32px; padding: 0 14px;
  border-radius: 8px;
  background: var(--wz-primary);
  color: #fff;
  border: none;
  font-size: 12px; font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(1, 122, 228, 0.25);
  transition: background 0.12s;
}
.wz-filter-apply:hover { background: var(--wz-primary-dark); }
.wz-filter-apply i { font-size: 10px; }

.wz-filter-clear {
  display: inline-flex;
  align-items: center;
  height: 32px; padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #DDE4F0;
  font-size: 12px; font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: background 0.12s;
}
.wz-filter-clear:hover { background: #F1F5F9; color: var(--text-primary); }

.wz-filter-pill {
  display: inline-flex;
  align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  background: #F0F6FF;
  color: var(--wz-primary);
  border: 1px solid #DDE4F0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  white-space: nowrap;
}
.wz-filter-pill-x {
  margin-left: 2px;
  color: var(--text-faint);
  font-size: 8px;
  transition: color 0.12s;
}
.wz-filter-pill-x:hover { color: var(--wz-error); }


/* ═══════════════════════════════════════════════════════════
   MODAL — wz-modal-*
   ═══════════════════════════════════════════════════════════ */

.wz-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.50);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.wz-modal-overlay.hidden { display: none !important; }

.wz-modal-container {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  width: 95%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: wz-modal-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* Double specificity guard */
.wz-modal-overlay .wz-modal-container {
  border-radius: 10px;
}
@keyframes wz-modal-in {
  from { transform: translateY(8px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1);      opacity: 1; }
}
.wz-modal-sm   { max-width: 480px; }
.wz-modal-md   { max-width: 640px; }
.wz-modal-lg   { max-width: 800px; }
.wz-modal-xl   { max-width: 1024px; }
.wz-modal-full { max-width: calc(100vw - 48px); }

.wz-modal-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: #F0F4F8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.wz-modal-title {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.wz-modal-subtitle {
  font-size: 13px; font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}
.wz-modal-close {
  width: 30px; height: 30px;
  border-radius: 7px; border: none;
  background: transparent; color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}
.wz-modal-close:hover { background: #F1F5F9; color: var(--text-primary); }

.wz-modal-body {
  padding: 28px;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  background: #fff;
}

.wz-modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: #F0F4F8;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  flex-shrink: 0;
}
.wz-modal-cancel {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: var(--btn-radius);
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  background: #fff; color: var(--text-secondary); border: 1px solid #CBD5E1;
  cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.wz-modal-cancel:hover { background: #F1F5F9; color: var(--text-primary); border-color: #94A3B8; }
.wz-modal-save {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: var(--btn-radius);
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  background: var(--wz-primary); color: #fff; border: 1px solid var(--wz-primary);
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.wz-modal-save:hover { background: var(--wz-primary-dark); border-color: var(--wz-primary-dark); }
.wz-modal-save i, .wz-modal-cancel i { font-size: 12px; }

/* Success variant for modal save button */
.wz-modal-save-success {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: var(--btn-radius);
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  background: var(--wz-secondary); color: #fff; border: 1px solid var(--wz-secondary);
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.wz-modal-save-success:hover { background: var(--wz-secondary-dark); border-color: var(--wz-secondary-dark); }
.wz-modal-save-success i { font-size: 12px; }

/* Danger variant for modal save button */
.wz-modal-save-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: var(--btn-radius);
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  background: var(--wz-error); color: #fff; border: 1px solid var(--wz-error);
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.wz-modal-save-danger:hover { background: #C81E1E; border-color: #C81E1E; }
.wz-modal-save-danger i { font-size: 12px; }


/* ═══════════════════════════════════════════════════════════
   BUTTONS — wz-btn-* (core DS button system)
   ═══════════════════════════════════════════════════════════ */
.wz-btn-primary, .wz-btn-success, .wz-btn-secondary,
.wz-btn-ghost, .wz-btn-danger, .wz-btn-warning, .wz-btn-dark {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; height: 40px; padding: 0 18px;
  border-radius: var(--btn-radius); font-size: 13.5px; font-weight: 600;
  font-family: inherit; letter-spacing: 0.01em; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap; text-decoration: none; outline: none;
}
.wz-btn-primary { background: var(--wz-primary); color: #fff; border-color: var(--wz-primary); }
.wz-btn-primary:hover { background: #0165CC; border-color: #0165CC; }
.wz-btn-success { background: var(--wz-secondary); color: #fff; border-color: var(--wz-secondary); }
.wz-btn-success:hover { background: #4F9433; border-color: #4F9433; }
.wz-btn-secondary { background: #fff; color: var(--text-secondary); border-color: #CBD5E1; }
.wz-btn-secondary:hover { background: #F1F5F9; color: var(--text-primary); border-color: #94A3B8; }
.wz-btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.wz-btn-ghost:hover { background: #EDF0F5; color: var(--text-secondary); }
.wz-btn-danger { background: var(--wz-error); color: #fff; border-color: var(--wz-error); }
.wz-btn-danger:hover { background: #C81E1E; border-color: #C81E1E; }
.wz-btn-warning { background: #F59E0B; color: #fff; border-color: #F59E0B; }
.wz-btn-warning:hover { background: #D97706; }
.wz-btn-dark { background: var(--wz-alt); color: #fff; border-color: var(--wz-alt); }
.wz-btn-dark:hover { background: #07152A; }

.wz-btn-primary-outline {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; height: 40px; padding: 0 18px; border-radius: var(--btn-radius);
  font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  background: transparent; color: var(--wz-primary); border: 1.5px solid var(--wz-primary);
  transition: background 0.12s, color 0.12s; white-space: nowrap; text-decoration: none; outline: none;
}
.wz-btn-primary-outline:hover { background: var(--wz-primary); color: #fff; }
.wz-btn-danger-outline {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; height: 40px; padding: 0 18px; border-radius: var(--btn-radius);
  font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  background: transparent; color: var(--wz-error); border: 1.5px solid var(--wz-error);
  transition: background 0.12s, color 0.12s; white-space: nowrap; text-decoration: none; outline: none;
}
.wz-btn-danger-outline:hover { background: var(--wz-error); color: #fff; }

/* Size variants */
.wz-btn-lg { height: 48px; padding: 0 28px; font-size: 15px; border-radius: 6px; }
.wz-btn-sm { height: 33px; padding: 0 14px; font-size: 12.5px; border-radius: 5px; }
.wz-btn-xs { height: 27px; padding: 0 10px; font-size: 12px; font-weight: 500; border-radius: 4px; }

/* Icon-only button */
.wz-btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border-radius: var(--btn-radius);
  background: #fff; border: 1px solid #E8ECF1; color: var(--text-muted);
  cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s;
  font-size: 14px;
}
.wz-btn-icon:hover { background: #F8FAFC; color: var(--text-primary); border-color: #CBD5E1; box-shadow: 0 1px 3px rgba(0,0,0,.06); }


/* ═══════════════════════════════════════════════════════════
   PHONE INPUT — wz-phone-*
   ═══════════════════════════════════════════════════════════ */
.wz-phone-group {
  display: flex; gap: 0; align-items: stretch;
}
.wz-phone-code {
  width: 105px; min-width: 105px; flex-shrink: 0;
  height: 40px; padding: 0 22px 0 10px;
  border: 1px solid var(--border-input);
  border-radius: var(--input-radius) 0 0 var(--input-radius);
  border-right: none;
  background: var(--bg-subtle); font-size: 13px; font-weight: 500;
  color: var(--text-primary); font-family: inherit; outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.wz-phone-code:focus {
  border-color: var(--wz-primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(1,122,228,0.1);
  z-index: 1; position: relative;
}
.wz-phone-number {
  flex: 1; min-width: 0;
  height: 40px; padding: 0 12px;
  border: 1px solid var(--border-input);
  border-radius: 0 var(--input-radius) var(--input-radius) 0;
  background: var(--bg-subtle); font-size: 13.5px; font-weight: 400;
  color: var(--text-primary); font-family: inherit; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.wz-phone-number::placeholder { color: var(--text-faint); }
.wz-phone-number:focus {
  border-color: var(--wz-primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(1,122,228,0.1);
  z-index: 1; position: relative;
}
.wz-phone-hidden { position: absolute; opacity: 0; pointer-events: none; height: 0; overflow: hidden; }


/* ═══════════════════════════════════════════════════════════
   EMPTY STATE — wz-empty-*
   ═══════════════════════════════════════════════════════════ */

.wz-empty-wrap {
  border-radius: var(--card-radius);
  border: 1px dashed var(--border);
  background: #FAFBFD;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  width: 100%;
}
.wz-empty-inner {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 56px 24px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.wz-empty-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: #F1F5F9;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--text-faint);
  margin-bottom: 18px;
}
.wz-empty-title {
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.wz-empty-message {
  font-size: 13.5px; color: var(--text-muted);
  max-width: 300px; line-height: 1.6;
  margin: 0 auto 20px;
}
.wz-empty-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px;
  border-radius: var(--btn-radius);
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  background: var(--wz-primary); color: #fff; border: 1px solid var(--wz-primary);
  cursor: pointer; transition: background 0.12s;
  text-decoration: none;
}
.wz-empty-action:hover { background: var(--wz-primary-dark); border-color: var(--wz-primary-dark); }
.wz-empty-action i { font-size: 12px; }

/* Size variants */
.wz-empty-sm { min-height: 260px; }
.wz-empty-sm .wz-empty-inner { padding: 32px 20px; }
.wz-empty-sm .wz-empty-icon { width: 48px; height: 48px; font-size: 18px; margin-bottom: 12px; }
.wz-empty-sm .wz-empty-title { font-size: 14px; }
.wz-empty-sm .wz-empty-message { font-size: 12.5px; }
.wz-empty-sm .wz-empty-action { height: 33px; padding: 0 14px; font-size: 12.5px; }

.wz-empty-lg { min-height: 420px; }
.wz-empty-lg .wz-empty-inner { padding: 72px 32px; }
.wz-empty-lg .wz-empty-icon { width: 80px; height: 80px; font-size: 32px; border-radius: 20px; }

/* Context overrides: when inside a table cell or card wrapper, remove double-border */
td .wz-empty-wrap,
.p-8 > .wz-empty-wrap {
  border: none;
  background: transparent;
  border-radius: 0;
}


/* ═══════════════════════════════════════════════════════════
   TOAST — wz-toast-*
   ═══════════════════════════════════════════════════════════ */

.wz-toast-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.wz-toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px;
  border-radius: 10px; border: 1px solid;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
  min-width: 300px; max-width: 440px;
  pointer-events: auto;
  animation: wz-toast-in 0.25s ease-out;
  font-family: inherit;
}
@keyframes wz-toast-in {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.wz-toast-success { border-color: #BBF7D0; background: #F0FDF4; }
.wz-toast-error   { border-color: #FECACA; background: #FEF2F2; }
.wz-toast-warning { border-color: #FDE68A; background: #FFFBEB; }
.wz-toast-info    { border-color: #BAE6FD; background: #F0F9FF; }
.wz-toast-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0; margin-top: 1px;
}
.wz-toast-success .wz-toast-icon { background: #DCFCE7; color: #15803D; }
.wz-toast-error   .wz-toast-icon { background: #FEE2E2; color: #DC2626; }
.wz-toast-warning .wz-toast-icon { background: #FEF3C7; color: #92400E; }
.wz-toast-info    .wz-toast-icon { background: #DBEAFE; color: #1D4ED8; }
.wz-toast-body { flex: 1; min-width: 0; }
.wz-toast-message {
  font-size: 13.5px; font-weight: 600;
  color: var(--text-primary); line-height: 1.4;
}
.wz-toast-close {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text-faint); font-size: 13px;
  transition: color 0.12s; flex-shrink: 0;
}
.wz-toast-close:hover { color: var(--text-primary); }
.wz-toast-dismiss { animation: wz-toast-out 0.2s ease-in forwards; }
@keyframes wz-toast-out {
  to { transform: translateX(40px); opacity: 0; }
}


/* ═══════════════════════════════════════════════════════════
   PAGINATION — wz-pagination-*
   ═══════════════════════════════════════════════════════════ */

.wz-pagination {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wz-pagination-info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.wz-pagination-info strong {
  font-weight: 700;
  color: var(--text-secondary);
}
.wz-pagination-sep { color: var(--border); }
.wz-pagination-nav {
  display: flex; align-items: center; gap: 4px;
}
.wz-pagination-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px;
  border-radius: var(--btn-radius);
  border: none; background: transparent;
  font-size: 13px; font-weight: 600; font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}
.wz-pagination-btn:hover { background: #E8ECF2; color: var(--text-primary); }
.wz-pagination-btn i { font-size: 10px; }
.wz-pagination-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.wz-pagination-active {
  background: var(--wz-primary);
  color: #fff;
}


/* ═══════════════════════════════════════════════════════════
   INDEX TOOLBAR — wz-toolbar-*
   ═══════════════════════════════════════════════════════════ */

.wz-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
}
.wz-toolbar-left { min-width: 0; }
.wz-toolbar-title-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.wz-toolbar-title {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}
.wz-toolbar-count {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.wz-toolbar-count i { color: var(--text-faint); font-size: 11px; }
.wz-toolbar-count span { color: var(--text-muted); }

.wz-toolbar-filtered {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: rgba(1, 122, 228, 0.06);
  border: 1px solid rgba(1, 122, 228, 0.15);
  color: var(--wz-primary);
}
.wz-toolbar-filtered i { font-size: 11px; }

.wz-toolbar-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 4px 0 0;
  font-weight: 500;
}
@media (max-width: 640px) { .wz-toolbar-subtitle { display: none; } }

.wz-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Search — matches DS .wz-input pattern */
.wz-toolbar-search { position: relative; flex: 1 1 auto; min-width: 0; }
@media (min-width: 640px) { .wz-toolbar-search { flex: 0 0 auto; width: 240px; } }
.wz-toolbar-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); font-size: 13px; pointer-events: none;
}
.wz-toolbar-search-input {
  width: 100%; height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-input);
  border-radius: var(--input-radius);
  background: var(--bg-subtle);
  font-size: 13.5px; font-weight: 400;
  color: var(--text-primary);
  font-family: inherit; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.wz-toolbar-search-input::placeholder { color: var(--text-faint); }
.wz-toolbar-search-input:focus {
  border-color: var(--wz-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(1, 122, 228, 0.1);
}
.wz-toolbar-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 2px 4px; cursor: pointer;
  color: var(--text-faint); font-size: 12px; transition: color 0.12s;
  text-decoration: none;
}
.wz-toolbar-search-clear:hover { color: var(--text-primary); }

/* View toggle — matches DS .wz-btn-group pattern */
.wz-toolbar-views {
  display: inline-flex;
  border-radius: var(--btn-radius);
  overflow: hidden;
  border: 1px solid #CBD5E1;
}
.wz-toolbar-view-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 14px;
  border: none; border-right: 1px solid #CBD5E1;
  border-radius: 0;
  background: #fff;
  font-size: 13px; font-weight: 500; font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.wz-toolbar-view-btn:last-child { border-right: none; }
.wz-toolbar-view-btn:hover { background: #F1F5F9; color: var(--text-primary); }
.wz-toolbar-view-active {
  background: var(--wz-primary);
  color: #fff;
}
.wz-toolbar-view-btn i { font-size: 11px; }
@media (max-width: 640px) { .wz-toolbar-view-label { display: none; } }

/* More actions menu — matches DS .wz-btn-icon pattern */
.wz-toolbar-menu { position: relative; flex-shrink: 0; }
.wz-toolbar-menu-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  border-radius: var(--btn-radius);
  background: #fff;
  border: 1px solid #CBD5E1;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.wz-toolbar-menu-trigger:hover {
  background: #F1F5F9; color: var(--text-primary); border-color: #94A3B8;
}

.wz-toolbar-menu-dropdown {
  display: none;
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(0,0,0,0.03);
  z-index: 100;
  padding: 6px 0;
}
.wz-toolbar-menu:hover .wz-toolbar-menu-dropdown,
.wz-toolbar-menu:focus-within .wz-toolbar-menu-dropdown { display: block; }

.wz-toolbar-menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; width: 100%;
  font-size: 13px; font-weight: 500; font-family: inherit;
  color: var(--text-secondary);
  background: none; border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  transition: background 0.1s;
}
.wz-toolbar-menu-item:hover { background: var(--bg-subtle); }
.wz-toolbar-menu-item i { color: var(--text-faint); width: 16px; text-align: center; }

/* Add button — matches DS .wz-btn-success pattern */
.wz-toolbar-add {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--wz-secondary);
  background: var(--wz-secondary);
  color: #fff;
  font-size: 13.5px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  text-decoration: none;
  flex-shrink: 0;
}
.wz-toolbar-add:hover { background: var(--wz-secondary-dark); border-color: var(--wz-secondary-dark); }
.wz-toolbar-add i { font-size: 12px; }
@media (max-width: 640px) { .wz-toolbar-add-label { display: none; } }


/* ═══════════════════════════════════════════════════════════
   VIEW HEADER — wz-viewheader-*
   ═══════════════════════════════════════════════════════════ */

.wz-viewheader {
  width: 100%;
  padding-top: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.wz-viewheader-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}

/* Left */
.wz-viewheader-left { min-width: 0; }

.wz-viewheader-breadcrumbs {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.wz-viewheader-bc-sep { font-size: 9px; color: var(--text-faint); }
.wz-viewheader-bc-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.1s;
}
.wz-viewheader-bc-link:hover { color: var(--text-primary); }
.wz-viewheader-bc-current { color: var(--text-secondary); }

.wz-viewheader-title-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

.wz-viewheader-back {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--btn-radius);
  border: 1px solid #CBD5E1;
  background: #fff;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  font-size: 14px;
  flex-shrink: 0;
}
.wz-viewheader-back:hover {
  background: #F1F5F9; color: var(--text-primary); border-color: #94A3B8;
}

.wz-viewheader-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  color: #fff; flex-shrink: 0;
  box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(15, 23, 42, 0.1);
}

.wz-viewheader-title {
  font-size: 20px; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.wz-viewheader-subtitle {
  font-size: 13.5px; font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}
.wz-viewheader-badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px;
  border-radius: 4px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Right — actions */
.wz-viewheader-right {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.wz-viewheader-primary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px;
  border-radius: var(--btn-radius);
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  background: var(--wz-primary); color: #fff; border: 1px solid var(--wz-primary);
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
  text-decoration: none;
}
.wz-viewheader-primary-btn:hover { background: var(--wz-primary-dark); border-color: var(--wz-primary-dark); }
.wz-viewheader-primary-btn i { font-size: 12px; }

.wz-viewheader-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  border-radius: var(--btn-radius);
  background: #fff; border: 1px solid #CBD5E1;
  color: var(--text-muted); font-size: 14px;
  cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.wz-viewheader-icon-btn:hover {
  background: #F1F5F9; color: var(--text-primary); border-color: #94A3B8;
}

/* Tabs — matches DS .wz-tabs-underline pattern */
.wz-viewheader-tabs {
  display: flex; align-items: center; gap: 0;
  border-bottom: 2px solid var(--border);
  margin-top: 16px;
}
.wz-viewheader-tab {
  height: 40px; padding: 0 18px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  color: var(--text-muted);
  border: none; background: transparent;
  cursor: pointer;
  position: relative;
  margin-bottom: -2px;
  transition: color 0.15s;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.wz-viewheader-tab::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px; background: transparent;
  transition: background 0.15s;
}
.wz-viewheader-tab:hover { color: var(--text-secondary); }
.wz-viewheader-tab-active { color: var(--wz-primary); }
.wz-viewheader-tab-active::after { background: var(--wz-primary); }
.wz-viewheader-tab i { font-size: 11px; opacity: 0.6; }
.wz-viewheader-tab-count {
  font-size: 11px; font-weight: 700;
  color: var(--text-faint);
  background: #F1F5F9;
  border-radius: 999px;
  min-width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.wz-viewheader-tab-active .wz-viewheader-tab-count {
  background: rgba(1,122,228,0.08);
  color: var(--wz-primary);
}

/* Dropdown menus */
.wz-viewheader-dropdown {
  display: none;
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(0,0,0,0.03);
  z-index: 100;
  padding: 6px 0;
}
.wz-viewheader-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; width: 100%;
  font-size: 13px; font-weight: 500; font-family: inherit;
  color: var(--text-secondary);
  background: none; border: none;
  cursor: pointer; text-decoration: none; text-align: left;
  transition: background 0.1s;
}
.wz-viewheader-dropdown-item:hover { background: var(--bg-subtle); }
.wz-viewheader-dropdown-item i { color: var(--text-faint); width: 16px; text-align: center; }
.wz-viewheader-dropdown-sep {
  height: 1px; background: var(--border); margin: 4px 12px;
}
.wz-viewheader-dropdown-item.wz-text-danger { color: var(--wz-error); }
.wz-viewheader-dropdown-item.wz-text-danger i { color: var(--wz-error); }


/* ═══════════════════════════════════════════════════════════
   BULK ACTION BAR — wz-bulk-*
   ═══════════════════════════════════════════════════════════ */

/* Outer container — fixed to bottom center, hidden by default via .hidden */
.wz-bulk {
  position: fixed; bottom: 24px;
  left: 50%; transform: translateX(-50%);
  z-index: 900;
  background: var(--wz-alt);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(0,0,0,0.1);
  padding: 0;
  opacity: 1;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: auto;
}
.wz-bulk.hidden {
  display: none;
}

.wz-bulk-inner {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 28px;
  min-width: 560px;
}

/* Left: info section */
.wz-bulk-info {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.wz-bulk-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px;
}
.wz-bulk-counts {
  white-space: nowrap;
}
.wz-bulk-selected {
  font-size: 13px; font-weight: 700;
  color: #fff;
}
.wz-bulk-selected span {
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  padding: 2px 9px;
  margin-right: 4px;
}
.wz-bulk-total {
  font-size: 11px; font-weight: 400;
  color: rgba(255,255,255,0.5);
  margin-top: 1px;
}

/* Right: controls section */
.wz-bulk-controls {
  display: flex; align-items: center; gap: 10px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.15);
}

.wz-bulk-select {
  height: 33px; padding: 0 28px 0 12px;
  border-radius: var(--btn-radius);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff; font-size: 12.5px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  outline: none;
}
.wz-bulk-select option { color: var(--text-primary); background: #fff; }

.wz-bulk-apply {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 33px; padding: 0 14px;
  border-radius: var(--btn-radius);
  background: var(--wz-primary); color: #fff;
  border: none; font-size: 12.5px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: background 0.12s;
}
.wz-bulk-apply:hover { background: var(--wz-primary-dark); }

.wz-bulk-clear {
  background: none; border: none; padding: 0 8px; cursor: pointer;
  color: rgba(255, 255, 255, 0.4); font-size: 12.5px; font-weight: 600;
  font-family: inherit;
  transition: color 0.12s;
}
.wz-bulk-clear:hover { color: #fff; }


/* ═══════════════════════════════════════════════════════════
   TIMELINE — wz-timeline-*
   ═══════════════════════════════════════════════════════════ */

.wz-timeline { display: flex; flex-direction: column; }
.wz-timeline-line {
  position: absolute; left: 17px; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(180deg, var(--border) 0%, transparent 100%);
  pointer-events: none;
}
.wz-timeline-item {
  position: relative;
  display: flex; align-items: flex-start; gap: 16px;
  padding: 12px 0;
}
.wz-timeline-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  z-index: 1;
  border: 1px solid var(--border);
  background: #fff;
}
.wz-timeline-body { flex: 1; min-width: 0; padding-bottom: 12px; border-bottom: 1px solid var(--border-subtle); }
.wz-timeline-item:last-child .wz-timeline-body { border-bottom: none; padding-bottom: 0; }
.wz-timeline-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.wz-timeline-type { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.wz-timeline-time { font-size: 12px; color: var(--text-faint); font-weight: 500; }
.wz-timeline-actor { font-size: 12px; color: var(--text-faint); font-weight: 500; }
.wz-timeline-content {
  margin-top: 4px;
  font-size: 13.5px; color: var(--text-secondary);
  line-height: 1.6;
}

/* Timeline icon color presets */
.wz-timeline-icon-call    { background: #EFF6FF; color: #2563EB; border-color: #BFDBFE; }
.wz-timeline-icon-email   { background: #EEF2FF; color: #4338CA; border-color: #C7D2FE; }
.wz-timeline-icon-meeting { background: #ECFDF5; color: #059669; border-color: #A7F3D0; }
.wz-timeline-icon-note    { background: #FFFBEB; color: #D97706; border-color: #FDE68A; }
.wz-timeline-icon-task    { background: #F5F3FF; color: #7C3AED; border-color: #DDD6FE; }
.wz-timeline-icon-system  { background: #F8FAFC; color: #64748B; border-color: var(--border); }


/* ═══════════════════════════════════════════════════════════
   DETAIL PANEL (side flyout) — wz-panel-*
   ═══════════════════════════════════════════════════════════ */

.wz-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0);
  z-index: 800;
  display: flex; justify-content: flex-end;
  transition: background 0.25s ease;
  pointer-events: none;
}
.wz-panel-overlay.visible {
  background: rgba(15, 23, 42, 0.18);
  pointer-events: auto;
}
.wz-panel-overlay.hidden { display: none !important; }

.wz-panel-container {
  width: 480px; max-width: 100vw;
  background: #fff;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.12);
  display: flex; flex-direction: column;
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.wz-panel-overlay.visible .wz-panel-container {
  transform: translateX(0);
}

.wz-panel-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
  position: relative; flex-shrink: 0;
}
.wz-panel-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 8px;
  border: none; background: transparent;
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.12s;
}
.wz-panel-close:hover { background: #F1F5F9; color: var(--text-primary); }
.wz-panel-title {
  font-size: 15px; font-weight: 700;
  color: var(--wz-primary); text-decoration: none;
  line-height: 1.3; padding-right: 40px;
}
.wz-panel-title:hover { text-decoration: underline; }
.wz-panel-sub { font-size: 11.5px; color: var(--text-faint); font-weight: 500; }

.wz-panel-fields {
  padding: 16px 24px;
  display: flex; flex-direction: column; gap: 14px;
  flex-shrink: 0;
}
.wz-panel-field { display: flex; align-items: center; gap: 12px; min-height: 28px; }
.wz-panel-field-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--text-muted);
  min-width: 110px; flex-shrink: 0;
}
.wz-panel-field-label i { font-size: 12px; width: 16px; text-align: center; color: var(--text-faint); }
.wz-panel-field-value {
  font-size: 13.5px; font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}

.wz-panel-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 24px; flex-shrink: 0;
}
.wz-panel-tab {
  padding: 11px 16px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  position: relative; border: none; background: transparent;
  font-family: inherit; transition: color 0.12s;
  display: flex; align-items: center; gap: 6px;
}
.wz-panel-tab:hover { color: var(--text-primary); }
.wz-panel-tab.active { color: var(--wz-primary); }
.wz-panel-tab.active::after {
  content: ''; position: absolute;
  bottom: -1px; left: 16px; right: 16px;
  height: 2px; background: var(--wz-primary);
  border-radius: 2px 2px 0 0;
}
.wz-panel-tab-count {
  font-size: 11px; font-weight: 700;
  color: var(--text-faint); background: #F1F5F9;
  border-radius: 999px; min-width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.wz-panel-tab.active .wz-panel-tab-count {
  background: rgba(1,122,228,0.08); color: var(--wz-primary);
}

.wz-panel-body { padding: 20px 24px; flex: 1; overflow-y: auto; }
.wz-panel-section-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-faint); margin-bottom: 10px;
}
.wz-panel-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.65; }

.wz-panel-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.wz-panel-footer-meta { font-size: 11.5px; color: var(--text-faint); font-weight: 500; }
.wz-panel-footer-actions { display: flex; align-items: center; gap: 8px; }

/* Panel header action buttons (expand, more, close) */
.wz-panel-header-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: none; background: transparent;
  color: #64748B; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.12s;
  text-decoration: none;
}
.wz-panel-header-btn:hover { background: #F1F5F9; color: #0f172a; }

/* ── Deal Preview Panel — wz-dp-* ── */
.wz-dp-section { padding: 20px 24px; }
.wz-dp-section-title {
  font-size: 14px; font-weight: 700; color: #0f172a;
  margin-bottom: 16px;
}
.wz-dp-divider { height: 1px; background: #F1F5F9; margin: 0; }
.wz-dp-fields { display: flex; flex-direction: column; gap: 14px; }
.wz-dp-row { display: flex; align-items: center; min-height: 28px; }
.wz-dp-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: #64748B;
  min-width: 140px; flex-shrink: 0;
}
.wz-dp-label i { font-size: 13px; width: 18px; text-align: center; color: #94A3B8; }
.wz-dp-value {
  font-size: 13.5px; font-weight: 600; color: #0f172a;
  display: flex; align-items: center; gap: 8px;
  flex: 1;
}
.wz-dp-amount { font-size: 15px; font-weight: 800; }
.wz-dp-priority-badge {
  display: inline-flex; padding: 3px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
  background: #EFF6FF; color: #2563EB; border: 1px solid #BFDBFE;
}

/* Contact card */
.wz-dp-contact {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #FAFBFC;
  border: 1px solid #F1F5F9; border-radius: 12px;
}
.wz-dp-contact-info { display: flex; align-items: center; gap: 12px; }
.wz-dp-contact-ava {
  width: 40px; height: 40px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff; flex-shrink: 0;
  background: #8B5CF6;
}
.wz-dp-contact-ava img {
  width: 40px; height: 40px; border-radius: 999px; object-fit: cover;
}
.wz-dp-contact-name { font-size: 14px; font-weight: 700; color: #0f172a; }
.wz-dp-contact-role { font-size: 12px; color: #64748B; font-weight: 500; margin-top: 1px; }
.wz-dp-contact-actions { display: flex; align-items: center; gap: 6px; }
.wz-dp-contact-btn {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid #E8ECF1; background: #fff;
  color: #64748B; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.12s; text-decoration: none;
}
.wz-dp-contact-btn:hover { background: #F1F5F9; color: #0f172a; border-color: #CBD5E1; }

/* Log activity button */
.wz-dp-log-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px;
  border: 1px solid #E8ECF1; background: #fff;
  color: #475569; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.12s;
}
.wz-dp-log-btn:hover { background: #F1F5F9; border-color: #CBD5E1; }
.wz-dp-log-btn i { font-size: 12px; color: #94A3B8; }

/* Empty state */
.wz-dp-empty { font-size: 13px; color: #94A3B8; font-weight: 500; }

/* Notes */
.wz-dp-notes { font-size: 13.5px; color: #475569; line-height: 1.65; }

/* Stage dot in panel */
.wz-dp-stage-dot {
  width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0;
}

/* Assignee in panel */
.wz-dp-assignee {
  display: flex; align-items: center; gap: 8px;
}
.wz-dp-assignee-ava {
  width: 24px; height: 24px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 8px; color: #fff; flex-shrink: 0;
}
.wz-dp-assignee-name { font-size: 13.5px; font-weight: 600; color: #0f172a; }

/* ═══════════════════════════════════════════════
   VIEW PAGE — shared patterns for CRM detail views
   (leads/view, contacts/view, accounts/view, deals/view)
   ═══════════════════════════════════════════════ */

/* ── Sidebar inline select (borderless, right-aligned) ── */
select.wz-sidebar-select, .wz-sidebar-select {
  font-size: .8125rem; font-weight: 600; color: var(--text-secondary);
  background: transparent; border: 0 none; border-width: 0; border-color: transparent;
  outline: 0; box-shadow: none;
  padding: 0 20px 0 0; text-align: right; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0 center;
}
select.wz-sidebar-select:focus, .wz-sidebar-select:focus {
  outline: 0; border: 0 none; border-width: 0; box-shadow: none;
}

/* ── Section title with blue left bar accent ── */
.wz-sidebar-title {
  display: flex; align-items: center; gap: 8px;
  font-size: .9375rem; font-weight: 700;
  color: var(--text-primary); letter-spacing: -.01em;
}
.wz-sidebar-title::before {
  content: ''; width: 3px; height: 16px;
  border-radius: 2px; background: var(--wz-primary); flex-shrink: 0;
}

/* ── View page type scale ── */
.wz-t-label {
  font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted);
}
.wz-t-caption { font-size: .6875rem; line-height: 1.4; letter-spacing: .02em; }
.wz-t-small   { font-size: .75rem; line-height: 1.5; }
.wz-t-body    { font-size: .875rem; line-height: 1.6; letter-spacing: -.005em; }
.wz-metric-value {
  font-size: 1.5rem; font-weight: 800;
  letter-spacing: -.02em; color: var(--text-primary); line-height: 1;
}

/* ── View page cards ── */
.wz-view-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--card-radius); transition: all .2s ease;
}
.wz-view-card:hover {
  border-color: #D4D9E4; box-shadow: 0 4px 16px rgba(0,0,0,.07);
}


/* ═══════════════════════════════════════════════════════════
   WORKMATES CHAT OVERLAY
   ═══════════════════════════════════════════════════════════ */
.wm-chat-overlay {
  --wm-agent-colour: #017AE4;
  position: fixed;
  bottom: 0;
  right: 24px;
  width: 480px;
  height: 600px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 32px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1), width .25s cubic-bezier(.4,0,.2,1);
  border: 1px solid var(--border, #E8ECF1);
  border-bottom: none;
}
.wm-chat-overlay.wm-chat-open {
  transform: translateY(0);
}
.wm-chat-overlay.wm-chat-minimised {
  transform: translateY(calc(100% - 52px));
}

/* Header */
.wm-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px 16px 0 0;
  background: var(--wm-agent-colour);
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}
.wm-chat-header-ava { flex-shrink: 0; }
.wm-chat-header-name {
  font-size: 14px; font-weight: 800; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wm-chat-header-status {
  display: block; font-size: 11px; color: rgba(255,255,255,.7); font-weight: 400;
}
.wm-chat-header-btn {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  background: rgba(255,255,255,.15); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: background .15s; flex-shrink: 0;
}
.wm-chat-header-btn:hover { background: rgba(255,255,255,.25); }

/* Thread */
.wm-chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  background: #FAFBFC;
}

/* Messages */
.wm-chat-overlay .wm-msg { display: flex; gap: 8px; align-items: flex-end; }
.wm-chat-overlay .wm-msg-user { flex-direction: row-reverse; }
.wm-bubble { max-width: 82%; padding: 10px 14px; font-size: 13.5px; line-height: 1.6; word-break: break-word; }
.wm-bubble-agent {
  background: #fff; border: 1px solid var(--border,#E8ECF1);
  border-radius: 4px 14px 14px 14px; color: var(--text-secondary,#334155);
}
.wm-bubble-user {
  background: #EFF6FF; border: 1px solid #DBEAFE;
  border-radius: 14px 4px 14px 14px; color: var(--text-primary,#0F172A);
}
.wm-user-dot {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--wz-primary,#017AE4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 800; flex-shrink: 0;
}

/* Typing indicator */
.wm-typing-dots { display: flex; gap: 4px; padding: 4px 0; }
.wm-typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--wm-agent-colour,#017AE4); opacity: .3;
  animation: wmTypePulse 1.4s ease-in-out infinite;
}
.wm-typing-dots span:nth-child(2) { animation-delay: .2s; }
.wm-typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes wmTypePulse {
  0%,80%,100% { opacity:.3; transform:scale(1); }
  40% { opacity:1; transform:scale(1.2); }
}

/* Input bar */
.wm-chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border, #E8ECF1);
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
  background: #fff;
}
.wm-chat-input {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border: 1px solid var(--border, #E8ECF1);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-primary, #0F172A);
  background: #F8FAFC;
  outline: none;
  transition: border-color .15s;
  overflow-y: auto;
}
.wm-chat-input:focus {
  border-color: var(--wz-primary, #017AE4);
  background: #fff;
}
.wm-chat-send {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
  color: #fff;
  font-size: 13px;
  background: var(--wm-agent-colour,#017AE4);
}
.wm-chat-send:hover { filter: brightness(.9); }

/* Responsive */
@media (max-width: 720px) {
  .wm-chat-overlay { right: 0; width: 100% !important; max-width: 100vw; border-radius: 16px 16px 0 0; }
  .wm-sidebar.wm-sidebar-open { width: 180px; }
}

/* ── WorkMate notification bell badge ── */
.wm-notif-badge {
  position: absolute; top: 1px; right: 1px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #EF4444; color: #fff; font-size: 9px; font-weight: 800;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; line-height: 1;
}


/* ═══════════════════════════════════════════════════════════
   TIMELINE FEED — wz-tf-*
   Rich activity feed with avatars, attachments, mentions
   ═══════════════════════════════════════════════════════════ */

.wz-tf-container { padding: 0; }
.wz-tf-list { padding: 16px 24px 24px; }

/* Date group headers */
.wz-tf-date-group {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary, #0F172A);
  padding: 16px 0 8px;
  position: relative;
}
.wz-tf-date-group:first-child { padding-top: 4px; }

/* Each timeline item */
.wz-tf-item {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 10px 0 4px;
}

/* Vertical connector line */
.wz-tf-line {
  position: absolute;
  left: 17px;
  top: 44px;
  bottom: -6px;
  width: 2px;
  background: var(--border, #E8ECF1);
  pointer-events: none;
}

/* ── Avatar dot (circular) ── */
.wz-tf-dot {
  flex-shrink: 0;
  width: 36px;
  z-index: 1;
  padding-top: 2px;
}
.wz-tf-dot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.wz-tf-dot-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 1px solid var(--border, #E8ECF1);
  background: #fff;
}
/* Icon color presets (for system-type dots) */
.wz-tf-icon-call     { background: #EFF6FF; color: #2563EB; border-color: #BFDBFE; }
.wz-tf-icon-email    { background: #EEF2FF; color: #4338CA; border-color: #C7D2FE; }
.wz-tf-icon-meeting  { background: #ECFDF5; color: #059669; border-color: #A7F3D0; }
.wz-tf-icon-whatsapp { background: #F0FDF4; color: #16A34A; border-color: #BBF7D0; }
.wz-tf-icon-note     { background: #FFFBEB; color: #D97706; border-color: #FDE68A; }
.wz-tf-icon-followup { background: #F5F3FF; color: #7C3AED; border-color: #DDD6FE; }
.wz-tf-icon-task     { background: #F5F3FF; color: #7C3AED; border-color: #DDD6FE; }
.wz-tf-icon-system   { background: #F8FAFC; color: #64748B; border-color: var(--border, #E8ECF1); }

/* ── Content column ── */
.wz-tf-content {
  flex: 1;
  min-width: 0;
  padding-bottom: 12px;
}

.wz-tf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.wz-tf-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.wz-tf-actor {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #0F172A);
}
.wz-tf-mention-inline {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #0F172A);
}
.wz-tf-time {
  font-size: 12px;
  color: var(--text-faint, #94A3B8);
  font-weight: 500;
  flex-shrink: 0;
}

/* Badges */
.wz-tf-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  margin-left: 2px;
}
.wz-tf-badge-ai         { background: #EFF6FF; color: #2563EB; border: 1px solid #BFDBFE; }
.wz-tf-badge-suggestion  { background: #FFFBEB; color: #D97706; border: 1px solid #FDE68A; }

/* Action label ("created a task", "Email", etc.) */
.wz-tf-action {
  font-size: 13px;
  color: var(--text-muted, #64748B);
  font-weight: 500;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wz-tf-action-icon {
  font-size: 11px;
  opacity: 0.7;
}

/* ── Rich card (email-style with border) ── */
.wz-tf-rich-card {
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--border, #E8ECF1);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s;
}
.wz-tf-rich-card:hover {
  border-color: #D4D9E4;
}

.wz-tf-subject {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #0F172A);
  margin-bottom: 6px;
}

/* Participants row inside rich card */
.wz-tf-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.wz-tf-participant {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #334155);
}
.wz-tf-participant-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Attachment chips ── */
.wz-tf-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle, #F1F5F9);
}

.wz-tf-att-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border, #E8ECF1);
  border-radius: 10px;
  background: #FAFBFC;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #334155);
  text-decoration: none;
  transition: all 0.15s;
  max-width: 200px;
}
.wz-tf-att-chip:hover {
  border-color: var(--wz-primary, #017AE4);
  background: #F0F7FF;
  color: var(--wz-primary, #017AE4);
}
.wz-tf-att-chip span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wz-tf-att-chip i { flex-shrink: 0; font-size: 15px; }

/* Attachment type colors */
.wz-tf-att-pdf i    { color: #EF4444; }
.wz-tf-att-doc i    { color: #2563EB; }
.wz-tf-att-xls i    { color: #16A34A; }
.wz-tf-att-ppt i    { color: #EA580C; }
.wz-tf-att-img i    { color: #7C3AED; }
.wz-tf-att-zip i    { color: #D97706; }
.wz-tf-att-default i { color: #64748B; }

.wz-tf-att-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: #F1F5F9;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted, #64748B);
}

/* ── Body text + read more ── */
.wz-tf-body {
  margin-top: 8px;
}
.wz-tf-rich-card .wz-tf-body {
  margin-top: 0;
}

.wz-tf-text {
  font-size: 13.5px;
  color: var(--text-secondary, #334155);
  line-height: 1.65;
  margin: 0;
}

.wz-tf-readmore, .wz-tf-readless {
  display: inline-block;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--wz-primary, #017AE4);
  cursor: pointer;
  transition: color 0.15s;
}
.wz-tf-readmore:hover, .wz-tf-readless:hover {
  color: #0059b3;
  text-decoration: underline;
}

.wz-tf-hidden { display: none !important; }

/* ── @mention autocomplete dropdown ── */
.wz-tf-mention-dd {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border, #E8ECF1);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 4px;
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
}
.wz-tf-mention-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #0F172A);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.wz-tf-mention-option:hover {
  background: #F1F5F9;
}
.wz-tf-mention-option-name {
  font-weight: 600;
}

/* ── Timeline Comments ── */

.wz-tf-comments-section {
  margin-top: 8px;
}

.wz-tf-comments-list {
  margin-bottom: 6px;
}

.wz-tf-comment {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  animation: wz-tf-comment-fadein 0.2s ease;
}

.wz-tf-comment + .wz-tf-comment {
  border-top: 1px solid var(--border-subtle, #F1F5F9);
}

@keyframes wz-tf-comment-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wz-tf-comment-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--wz-primary, #017AE4);
  flex-shrink: 0;
  margin-top: 1px;
}

.wz-tf-comment-body {
  flex: 1;
  min-width: 0;
}

.wz-tf-comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.wz-tf-comment-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #0F172A);
}

.wz-tf-comment-time {
  font-size: 11px;
  color: var(--text-faint, #94A3B8);
}

.wz-tf-comment-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary, #334155);
  margin: 0;
  word-break: break-word;
}

/* Reply button */
.wz-tf-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #64748B);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}

.wz-tf-reply-btn:hover {
  color: var(--wz-primary, #017AE4);
}

.wz-tf-reply-btn i {
  font-size: 13px;
}

/* Reply form */
.wz-tf-reply-form {
  margin-top: 8px;
}

.wz-tf-reply-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.wz-tf-reply-input-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-subtle, #F8FAFC);
  border: 1px solid var(--border, #E8ECF1);
  border-radius: 12px;
  padding: 8px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wz-tf-reply-input-wrap:focus-within {
  border-color: var(--wz-primary, #017AE4);
  box-shadow: 0 0 0 3px rgba(1, 122, 228, 0.08);
}

.wz-tf-reply-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary, #0F172A);
  resize: none;
  outline: none;
  font-family: inherit;
  min-height: 20px;
  max-height: 120px;
}

.wz-tf-reply-input::placeholder {
  color: var(--text-faint, #94A3B8);
}

.wz-tf-reply-send {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  border: none;
  background: var(--wz-primary, #017AE4);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}

.wz-tf-reply-send:hover {
  background: var(--wz-primary-dark, #0165CC);
  transform: scale(1.05);
}

.wz-tf-reply-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}


/* ═══════════════════════════════════════════════════════════
   DATEPICKER — wz-dp-*
   Modern calendar dropdown for date/datetime inputs
   ═══════════════════════════════════════════════════════════ */

.wz-dp-wrap {
  position: relative;
  width: 100%;
}

.wz-dp-trigger {
  display: flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  background: #fff;
  min-height: 42px;
}
.wz-dp-trigger:focus { outline: none; border-color: var(--wz-primary, #017AE4); box-shadow: 0 0 0 3px rgba(1,122,228,0.1); }

.wz-dp-icon {
  color: var(--text-muted, #64748B);
  font-size: 14px;
  flex-shrink: 0;
}

.wz-dp-display {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--text-primary, #0F172A);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wz-dp-placeholder {
  color: var(--text-muted, #64748B);
  font-weight: 400;
}

.wz-dp-chevron {
  font-size: 10px;
  color: var(--text-muted, #64748B);
  flex-shrink: 0;
  transition: transform 0.2s;
}

/* Dropdown */
.wz-dp-dropdown {
  background: #fff;
  border: 1px solid var(--border, #E8ECF1);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  padding: 20px;
  width: 320px;
  animation: wzDpIn 0.15s ease-out;
}
@keyframes wzDpIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wz-dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.wz-dp-month-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #0F172A);
}

.wz-dp-nav-prev, .wz-dp-nav-next {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border, #E8ECF1);
  background: #fff;
  color: var(--text-secondary, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 12px;
}
.wz-dp-nav-prev:hover, .wz-dp-nav-next:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.wz-dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 8px;
}
.wz-dp-weekdays span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748B);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 0;
}

.wz-dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.wz-dp-day {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #0F172A);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.12s;
  position: relative;
}
.wz-dp-day:hover:not(.wz-dp-day-empty):not(.wz-dp-day-disabled) {
  background: #F1F5F9;
}
.wz-dp-day-empty { cursor: default; }
.wz-dp-day-today {
  font-weight: 700;
  color: var(--wz-primary, #017AE4);
}
.wz-dp-day-today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--wz-primary, #017AE4);
}
.wz-dp-day-selected {
  background: var(--wz-primary, #017AE4) !important;
  color: #fff !important;
  font-weight: 700;
}
.wz-dp-day-selected::after { display: none; }

/* Time picker row */
.wz-dp-time {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle, #F1F5F9);
}
.wz-dp-time-icon {
  font-size: 14px;
  color: var(--text-muted, #64748B);
}
.wz-dp-time-select {
  padding: 6px 10px;
  border: 1px solid var(--border, #E8ECF1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #0F172A);
  background: #fff;
  cursor: pointer;
  outline: none;
}
.wz-dp-time-select:focus {
  border-color: var(--wz-primary, #017AE4);
  box-shadow: 0 0 0 3px rgba(1,122,228,0.1);
}
.wz-dp-time-sep {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted, #64748B);
}

/* Footer */
.wz-dp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle, #F1F5F9);
}
.wz-dp-footer-right {
  display: flex;
  gap: 8px;
}
.wz-dp-clear {
  padding: 7px 14px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #64748B);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}
.wz-dp-clear:hover { background: #F1F5F9; color: var(--wz-error, #EF4444); }
.wz-dp-cancel {
  padding: 7px 16px;
  border: 1px solid var(--border, #E8ECF1);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #334155);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}
.wz-dp-cancel:hover { background: #F8FAFC; }
.wz-dp-apply {
  padding: 7px 18px;
  border: none;
  background: var(--wz-primary, #017AE4);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}
.wz-dp-apply:hover { background: #0062c5; }
.wz-dp-apply-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
