/* ============================================================
   Bristol Business Systems CRM — Stylesheet
   ============================================================ */

:root {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 0px;
  --primary: #1e3a5f;
  --primary-light: #2d6a9f;
  --accent: #e8511a;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-muted: #6b7280;
  --topbar-height: 60px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  overflow-x: hidden;
}

/* ===== LAYOUT ===== */
.wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
}

.brand-sub {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
}

.sidebar-nav {
  list-style: none;
  margin: 12px 0 0;
  padding: 0 12px;
  flex: 1;
}

.sidebar-nav li { margin-bottom: 2px; }

.nav-section {
  color: rgba(255,255,255,0.35);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 16px 8px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link i { font-size: 16px; width: 20px; text-align: center; }
.sidebar-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-link.active { background: rgba(255,255,255,0.15); color: #fff; }
.sidebar-link.active i { color: #62b6ff; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.user-name { color: #fff; font-size: 13px; font-weight: 600; }
.user-role { color: rgba(255,255,255,0.5); font-size: 11px; }

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.3s ease;
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sidebar-toggle-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: none;
}

.sidebar-toggle-btn:hover { background: var(--bg); }

.topbar-breadcrumb { flex: 1; }

.badge-bbs {
  background: #ecfdf5;
  color: #065f46;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #a7f3d0;
}

/* ===== PAGE CONTENT ===== */
.page-content {
  padding: 28px 28px;
  flex: 1;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

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

/* ===== CARDS ===== */
.card-crm {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-crm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-crm-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.card-crm-body {
  padding: 20px;
}

/* ===== KPI CARDS ===== */
.kpi-card {
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  min-height: 130px;
  color: #fff;
}

.kpi-card::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.kpi-blue { background: linear-gradient(135deg, #1e3a5f, #2d6a9f); }
.kpi-teal { background: linear-gradient(135deg, #0d5e6e, #17a2b8); }
.kpi-green { background: linear-gradient(135deg, #14532d, #198754); }
.kpi-orange { background: linear-gradient(135deg, #92400e, #f59e0b); }
.kpi-red { background: linear-gradient(135deg, #7f1d1d, #dc3545); }

.kpi-icon { font-size: 22px; opacity: 0.85; }
.kpi-value { font-size: 26px; font-weight: 800; line-height: 1; }
.kpi-label { font-size: 13px; opacity: 0.85; }
.kpi-sub { font-size: 11px; opacity: 0.7; }

.kpi-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.kpi-link:hover { background: rgba(0,0,0,0.08); }
.kpi-card { cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.kpi-card:hover { transform: scale(1.04); box-shadow: 0 12px 32px rgba(0,0,0,0.22); }

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-lead { background: #eff6ff; color: #1d4ed8; }
.status-prospect { background: #fff7ed; color: #c2410c; }
.status-customer { background: #f0fdf4; color: #15803d; }
.status-inactive { background: #f9fafb; color: #6b7280; }
.status-partner { background: #fdf4ff; color: #7e22ce; }

/* ===== STAGE BADGES ===== */
.stage-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

.stage-prospecting { background: #f3f4f6; color: #6b7280; }
.stage-qualification { background: #eff6ff; color: #1d4ed8; }
.stage-proposal { background: #fff7ed; color: #c2410c; }
.stage-negotiation { background: #fdf4ff; color: #7e22ce; }
.stage-closed_won { background: #f0fdf4; color: #15803d; }
.stage-closed_lost { background: #fef2f2; color: #b91c1c; }

/* ===== TABLES ===== */
.crm-table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}

.crm-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

.crm-table tbody tr:hover td { background: #f9fafb; }
.crm-table tbody tr:last-child td { border-bottom: none; }

/* ===== AVATARS ===== */
.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.company-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.company-icon-lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== DEAL LIST ===== */
.deal-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.deal-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6;
  gap: 12px;
}

.deal-list-item:last-child { border-bottom: none; }
.deal-list-item:hover { background: #f9fafb; }

.deal-title { font-size: 14px; font-weight: 600; }
.deal-company { font-size: 12px; }
.deal-value { font-size: 15px; color: var(--primary); }

/* ===== ACTIVITY LIST ===== */
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: #fff;
}

.activity-call { background: #2563eb; }
.activity-email { background: #7c3aed; }
.activity-sms { background: #0891b2; }
.activity-meeting { background: #059669; }
.activity-note { background: #d97706; }
.activity-task { background: #dc2626; }

.activity-body { flex: 1; min-width: 0; }
.activity-subject { font-size: 14px; }
.activity-time { white-space: nowrap; padding-top: 2px; }

/* ===== DETAIL LIST (dl) ===== */
.detail-list {
  margin: 0;
}

.detail-list dt {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 3px;
  margin-top: 14px;
}

.detail-list dt:first-child { margin-top: 0; }

.detail-list dd {
  font-size: 14px;
  margin-bottom: 0;
  color: var(--text);
}

.detail-list dd a { color: var(--primary); }

/* ===== NOTES BOX ===== */
.notes-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px;
}

/* ===== MINI STATS ===== */
.mini-stat {
  padding: 12px;
  border-radius: 8px;
  background: var(--bg);
}

.mini-stat-value { font-size: 18px; font-weight: 700; }
.mini-stat-label { font-size: 11px; color: var(--text-muted); }

/* ===== GHOST BUTTON ===== */
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 6px;
}

.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* ===== FORMS ===== */
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(45, 106, 159, 0.15);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-light);
  border-color: var(--primary-light);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* ===== RESPONSIVE ===== */
/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ===== TABLET (≤992px) ===== */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1000;
  }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle-btn { display: flex; }
  .page-content { padding: 20px 16px; }

  /* Page headers wrap on tablet */
  .page-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Tables scroll horizontally */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Conv card height on tablet */
  .conv-card { min-height: 400px; }
  .conv-thread { max-height: 360px; }
}

/* ===== MOBILE (≤576px) ===== */
@media (max-width: 576px) {
  /* Topbar */
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-sep { display: none; }
  .topbar-page { display: none; }
  .topbar-org { font-size: 13px; color: var(--text); }
  .badge-bbs { font-size: 10px; padding: 3px 8px; }

  /* Page content */
  .page-content { padding: 14px 12px; }
  .page-header { margin-bottom: 16px; }
  .page-title { font-size: 18px; }
  .page-subtitle { font-size: 12px; }

  /* KPI cards — 2 per row on mobile */
  .kpi-value { font-size: 20px; }
  .kpi-card { min-height: 110px; padding: 14px; }

  /* Cards */
  .card-crm-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .card-crm-body { padding: 14px; }
  .card-crm-title { font-size: 13px; }

  /* Deal list */
  .deal-list-item { padding: 10px 14px; }
  .deal-title { font-size: 13px; }
  .deal-value { font-size: 13px; }

  /* Activity list */
  .activity-item { padding: 10px 14px; gap: 10px; }
  .activity-icon { width: 32px; height: 32px; font-size: 13px; }

  /* Buttons in page headers stack */
  .page-header .d-flex.gap-2 { flex-wrap: wrap; }
  .page-header .btn { font-size: 12px; padding: 6px 12px; }

  /* Forms */
  .form-control, .form-select { font-size: 16px; } /* prevents iOS zoom */

  /* Conversations */
  .conv-card { min-height: 350px; }
  .conv-thread { max-height: 280px; padding: 12px; }
  .conv-compose { padding: 12px; }
  .conv-channel-tabs { gap: 3px; }
  .conv-channel-btn { padding: 4px 8px; font-size: 11px; }
  .conv-msg { padding: 9px 11px; }
  .conv-outbound { margin-left: 0; }
  .conv-inbound { margin-right: 0; }

  /* Calendar */
  .cal-grid { gap: 2px; padding: 2px 4px 6px; }
  .cal-weekdays { gap: 2px; padding: 6px 4px 2px; }
  .cal-cell { min-height: 44px; border-radius: 6px; padding: 4px; }
  .cal-weekday { font-size: 9px; padding: 5px 2px; border-radius: 5px; }
  .cal-day-num { font-size: 11px; width: 22px; height: 22px; }

  /* Tables */
  .crm-table td, .crm-table th { font-size: 12px; padding: 8px 10px; }

  /* Avatars */
  .avatar-lg { width: 42px; height: 42px; font-size: 15px; }

  /* DT picker */
  .dt-picker { flex-direction: column; gap: 6px; }
  .dt-time-select { flex: none; width: 100%; }

  /* Profile page */
  .detail-list dt { font-size: 11px; }
  .detail-list dd { font-size: 13px; }
}

/* ===== CONVERSATIONS ===== */
.conv-card { display: flex; flex-direction: column; height: 100%; min-height: 500px; }

.conv-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  min-height: 200px;
}

.conv-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.conv-msg {
  border-radius: 10px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  font-size: 13.5px;
}

.conv-outbound { background: #eff6ff; border-color: #bfdbfe; margin-left: 32px; }
.conv-inbound  { background: #ffffff; margin-right: 32px; }
.conv-note     { background: #fffbeb; border-color: #fde68a; }
.conv-call     { background: #f0fdf4; border-color: #bbf7d0; border-style: dashed; }

.conv-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.conv-ch-icon { font-size: 11px; }
.conv-ch-email    { color: #7c3aed; }
.conv-ch-sms      { color: #0891b2; }
.conv-ch-note     { color: #d97706; }
.conv-ch-call     { color: #059669; }

.conv-inbound-badge {
  font-size: 10px;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
  padding: 1px 6px;
  border-radius: 10px;
}

.conv-msg-subject {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.conv-msg-body {
  white-space: pre-wrap;
  line-height: 1.55;
  color: var(--text);
}

.conv-compose {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  background: #fafafa;
  border-radius: 0 0 var(--radius) var(--radius);
}

.conv-channel-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.conv-channel-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}

.conv-channel-btn:hover:not(.active):not(:disabled) {
  background: var(--bg);
  color: var(--text);
}

.conv-channel-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.conv-channel-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.conv-textarea { resize: none; }

.conv-send-btn {
  white-space: nowrap;
  align-self: flex-end;
  margin-bottom: 0;
}

/* ===== DATE/TIME PICKER ===== */
.dt-picker {
  display: flex;
  gap: 8px;
}

.dt-picker .form-control { flex: 1 1 55%; min-width: 0; }
.dt-time-select { flex: 0 0 120px; }

/* ===== CALENDAR ===== */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 10px 10px 4px;
}

.cal-weekday {
  padding: 7px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: #f1f5f9;
  border-radius: 8px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 4px 10px 10px;
}

.cal-cell {
  min-height: 110px;
  padding: 8px;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.cal-cell:hover {
  background: #e8f0fe;
  box-shadow: 0 4px 12px rgba(59,130,246,0.14);
  transform: scale(1.03);
  z-index: 2;
}

.cal-cell-empty {
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.cal-cell-empty:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.cal-today {
  background: #dbeafe;
  box-shadow: 0 2px 8px rgba(59,130,246,0.2);
  border: 1.5px solid #93c5fd;
}

.cal-today:hover {
  background: #bfdbfe;
  box-shadow: 0 4px 14px rgba(59,130,246,0.28);
}

.cal-day-num {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.cal-today .cal-day-num {
  background: var(--primary);
  color: #fff;
}

.cal-day-appts { display: flex; flex-direction: column; gap: 3px; }

.cal-appt {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.1s, transform 0.1s;
}

.cal-appt:hover { opacity: 0.88; transform: scale(1.02); }
.cal-appt-meeting   { background: #1e3a5f; }
.cal-appt-call      { background: #198754; }
.cal-appt-demo      { background: #6610f2; }
.cal-appt-follow_up { background: #e07a10; }
.cal-appt-other     { background: #6c757d; }

.cal-more {
  font-size: 11px;
  color: var(--primary);
  padding: 2px 6px;
  font-weight: 600;
  background: rgba(30,58,95,0.08);
  border-radius: 5px;
  display: inline-block;
}

/* ===== AGENDA LIST ===== */
.agenda-date-header {
  padding: 8px 20px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}

.agenda-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.agenda-item:hover { background: #f5f7ff; }
.agenda-item:last-child { border-bottom: none; }

.agenda-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 68px;
}

.agenda-title { font-size: 14px; font-weight: 600; }
.agenda-sub { font-size: 12px; }

/* ===== TYPE BADGES ===== */
.type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
  color: #fff;
}

.type-meeting   { background: #1e3a5f; }
.type-call      { background: #198754; }
.type-demo      { background: #6610f2; }
.type-follow_up { background: #fd7e14; }
.type-other     { background: #6c757d; }

/* ===== SYNC SECTION ===== */
.sync-url {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  word-break: break-all;
  color: var(--text-muted);
}

.sync-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid var(--border);
  height: 100%;
}

.sync-step-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== MODAL DETAIL ROWS ===== */
.modal-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.modal-detail-row i { margin-top: 2px; flex-shrink: 0; }
.modal-detail-row span { color: var(--text); }

@media (max-width: 767px) {
  .cal-cell { min-height: 52px; border-radius: 8px; }
  .cal-appt { display: none; }
  .cal-more { display: none; }
  .cal-day-num { font-size: 12px; }
}
