/**
 * Reception Control Layer — Styles
 * All classes are prefixed with `.rcl-` to avoid collisions with main.css.
 * Uses existing CSS custom properties from main.css (--teal-*, --gray-*, etc.).
 */

/* ═══════════════════════════════════════════════════════════
   PAGE LAYOUT
═══════════════════════════════════════════════════════════ */

.rcl-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: calc(100vh - 56px); /* subtract utility bar height */
  background: #f8fafc;
}

.rcl-page-inner {
  padding: 20px 24px;
  flex: 1;
}

/* ═══════════════════════════════════════════════════════════
   PAGE HEADER
═══════════════════════════════════════════════════════════ */

.rcl-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 40;
}

.rcl-page-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.rcl-breadcrumb {
  font-size: 13px;
  color: #6b7280;
  margin: 2px 0 0;
}

/* ═══════════════════════════════════════════════════════════
   FILTER BAR
═══════════════════════════════════════════════════════════ */

.rcl-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
  flex-wrap: wrap;
}

.rcl-filter-bar label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.rcl-filter-bar select,
.rcl-filter-bar input[type="date"] {
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  background: #ffffff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.rcl-filter-bar select:focus,
.rcl-filter-bar input[type="date"]:focus {
  border-color: #2E7A64;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.rcl-filter-divider {
  width: 1px;
  height: 20px;
  background: #e5e7eb;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   KPI CARDS
═══════════════════════════════════════════════════════════ */

.rcl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.rcl-kpi-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rcl-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rcl-kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.rcl-kpi-sub {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

.rcl-kpi-value--warning { color: #d97706; }
.rcl-kpi-value--danger  { color: #dc2626; }
.rcl-kpi-value--success { color: #059669; }

/* ═══════════════════════════════════════════════════════════
   MAIN GRID — 3 COLUMNS
═══════════════════════════════════════════════════════════ */

.rcl-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* ═══════════════════════════════════════════════════════════
   SECTION CARDS
═══════════════════════════════════════════════════════════ */

.rcl-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.rcl-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.rcl-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.rcl-section-count {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 99px;
}

.rcl-section-count--red {
  background: #fee2e2;
  color: #dc2626;
}

.rcl-list {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

.rcl-list::-webkit-scrollbar { width: 4px; }
.rcl-list::-webkit-scrollbar-track { background: transparent; }
.rcl-list::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 2px; }

.rcl-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid #f9fafb;
  transition: background 0.1s;
}

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

.rcl-list-empty {
  padding: 28px 18px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
}

.rcl-view-all {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: #2E7A64;
  font-weight: 500;
  text-decoration: none;
  border-top: 1px solid #f3f4f6;
  transition: background 0.1s;
}

.rcl-view-all:hover { background: #f0fdf4; }

/* ═══════════════════════════════════════════════════════════
   APPOINTMENT ROW (Schedule list item)
═══════════════════════════════════════════════════════════ */

.rcl-appt-time {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  white-space: nowrap;
  min-width: 50px;
  padding-top: 2px;
}

.rcl-appt-body {
  flex: 1;
  min-width: 0;
}

.rcl-appt-client {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rcl-appt-client a {
  color: inherit;
  text-decoration: none;
}

.rcl-appt-client a:hover { color: #2E7A64; }

.rcl-appt-meta {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rcl-appt-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   PAYMENT FLAG BADGES
═══════════════════════════════════════════════════════════ */

.rcl-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rcl-flag::before {
  content: '●';
  font-size: 8px;
}

.rcl-flag--green  { background: #d1fae5; color: #065f46; }
.rcl-flag--yellow { background: #fef3c7; color: #92400e; }
.rcl-flag--red    { background: #fee2e2; color: #991b1b; }

/* ═══════════════════════════════════════════════════════════
   ACTION BUTTONS (compact — 12px, used inside list rows)
═══════════════════════════════════════════════════════════ */

.rcl-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.1s;
  font-family: inherit;
  text-decoration: none;
}

.rcl-btn:hover  { opacity: 0.85; }
.rcl-btn:active { transform: scale(0.97); }

.rcl-btn--confirm { background: #2E7A64; color: #ffffff; }
.rcl-btn--paid    { background: #059669; color: #ffffff; }
.rcl-btn--noshow  { background: #e5e7eb; color: #374151; }
.rcl-btn--task    { background: #ede9fe; color: #5b21b6; }
.rcl-btn--snap    {
  background: transparent;
  color: #2E7A64;
  padding: 5px 6px;
  text-decoration: underline;
  text-decoration-style: dotted;
}
.rcl-btn--danger  { background: #fee2e2; color: #991b1b; }
.rcl-btn--icon    { padding: 5px 7px; }

.rcl-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Flag override dropdown */
.rcl-flag-dropdown {
  position: relative;
  display: inline-block;
}

.rcl-flag-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 200;
  min-width: 130px;
  overflow: hidden;
}

.rcl-flag-dropdown-menu.show { display: block; }

.rcl-flag-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.1s;
  border: none;
  width: 100%;
  background: none;
  font-family: inherit;
  text-align: left;
}

.rcl-flag-dropdown-item:hover { background: #f9fafb; }

/* ═══════════════════════════════════════════════════════════
   FOLLOW-UP QUEUE ITEM
═══════════════════════════════════════════════════════════ */

.rcl-followup-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 18px;
  border-bottom: 1px solid #f9fafb;
  transition: background 0.1s;
}

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

.rcl-followup-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rcl-followup-client {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.rcl-followup-client a {
  color: inherit;
  text-decoration: none;
}

.rcl-followup-client a:hover { color: #2E7A64; }

.rcl-followup-reason {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
}

.rcl-followup-reason--1 { background: #ede9fe; color: #5b21b6; } /* protocol */
.rcl-followup-reason--2 { background: #fef3c7; color: #92400e; } /* membership expiring */
.rcl-followup-reason--3 { background: #fee2e2; color: #991b1b; } /* 30d */
.rcl-followup-reason--4 { background: #fef2f2; color: #b91c1c; } /* 60d */

.rcl-followup-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rcl-followup-action {
  font-size: 12px;
  color: #2E7A64;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   MODAL (task creation)
═══════════════════════════════════════════════════════════ */

.rcl-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.rcl-modal-overlay.show {
  display: flex;
}

.rcl-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}

.rcl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #f3f4f6;
}

.rcl-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.rcl-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 4px;
  font-size: 18px;
  line-height: 1;
}

.rcl-modal-close:hover { color: #111827; background: #f3f4f6; }

.rcl-modal-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rcl-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rcl-form-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.rcl-form-label span {
  color: #dc2626;
  margin-left: 2px;
}

.rcl-form-input,
.rcl-form-select,
.rcl-form-textarea {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  color: #111827;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  background: #ffffff;
}

.rcl-form-input:focus,
.rcl-form-select:focus,
.rcl-form-textarea:focus {
  border-color: #2E7A64;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}

.rcl-form-textarea {
  resize: vertical;
  min-height: 72px;
}

.rcl-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid #f3f4f6;
}

.rcl-btn--secondary {
  background: #f3f4f6;
  color: #374151;
  padding: 8px 18px;
  font-size: 13px;
}

.rcl-btn--primary {
  background: #2E7A64;
  color: #ffffff;
  padding: 8px 18px;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════
   SNAPSHOT PAGE — FLAG STRIP
═══════════════════════════════════════════════════════════ */

.rcl-snapshot-header {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.rcl-snapshot-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2E7A64 0%, #1e4d3f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.rcl-snapshot-name {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
}

.rcl-snapshot-meta {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rcl-snapshot-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rcl-snapshot-link {
  margin-left: auto;
  font-size: 13px;
  color: #2E7A64;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.rcl-snapshot-link:hover { text-decoration: underline; }

/* Five-flag strip */
.rcl-flag-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.rcl-flag-pill {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rcl-flag-pill--active  { border-color: #a7f3d0; background: #f0fdf4; }
.rcl-flag-pill--warning { border-color: #fcd34d; background: #fffbeb; }
.rcl-flag-pill--error   { border-color: #fca5a5; background: #fff1f2; }
.rcl-flag-pill--neutral { border-color: #e5e7eb; background: #ffffff; }

.rcl-flag-pill-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6b7280;
}

.rcl-flag-pill-value {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.rcl-flag-pill--active  .rcl-flag-pill-value { color: #065f46; }
.rcl-flag-pill--warning .rcl-flag-pill-value { color: #92400e; }
.rcl-flag-pill--error   .rcl-flag-pill-value { color: #991b1b; }

/* Snapshot content cards */
.rcl-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.rcl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.rcl-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.rcl-card-body {
  padding: 16px 18px;
}

/* Visit history mini-table */
.rcl-visit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rcl-visit-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  padding: 0 0 8px;
  border-bottom: 1px solid #f3f4f6;
}

.rcl-visit-table td {
  padding: 9px 0;
  color: #374151;
  border-bottom: 1px solid #f9fafb;
  vertical-align: middle;
}

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

/* Sessions progress bar */
.rcl-progress-bar {
  height: 6px;
  border-radius: 99px;
  background: #e5e7eb;
  overflow: hidden;
  margin-top: 6px;
}

.rcl-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: #2E7A64;
  transition: width 0.3s ease;
}

.rcl-progress-fill--warning { background: #f59e0b; }
.rcl-progress-fill--danger  { background: #ef4444; }

/* ═══════════════════════════════════════════════════════════
   LOADING / ERROR STATES
═══════════════════════════════════════════════════════════ */

.rcl-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: #6b7280;
  font-size: 13px;
  gap: 10px;
}

.rcl-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #e5e7eb;
  border-top-color: #2E7A64;
  border-radius: 50%;
  animation: rcl-spin 0.7s linear infinite;
}

@keyframes rcl-spin {
  to { transform: rotate(360deg); }
}

.rcl-error {
  padding: 16px 18px;
  background: #fff1f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  font-size: 13px;
  color: #991b1b;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
  .rcl-main-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rcl-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .rcl-main-grid {
    grid-template-columns: 1fr;
  }

  .rcl-flag-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .rcl-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rcl-flag-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .rcl-page-inner {
    padding: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════
   PHASE 2 — NEXT BEST ACTIONS
═══════════════════════════════════════════════════════════ */

.rcl-section--full {
  grid-column: 1 / -1;
}

.rcl-section-subtitle {
  font-size: 12px;
  color: #9ca3af;
  margin-left: 8px;
}

.rcl-nba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 4px 0;
}

.rcl-nba-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  transition: box-shadow 0.15s;
}

.rcl-nba-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.rcl-nba-card--urgent {
  border-color: #fca5a5;
  background: #fff5f5;
}

.rcl-nba-card--moderate {
  border-color: #fcd34d;
  background: #fffbeb;
}

.rcl-nba-score {
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rcl-nba-card--urgent .rcl-nba-score {
  background: #fee2e2;
  color: #991b1b;
}

.rcl-nba-card--moderate .rcl-nba-score {
  background: #fef3c7;
  color: #92400e;
}

.rcl-nba-body {
  flex: 1;
  min-width: 0;
}

.rcl-nba-client {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rcl-nba-client a {
  color: inherit;
  text-decoration: none;
}

.rcl-nba-client a:hover { text-decoration: underline; }

.rcl-nba-phone {
  font-size: 11px;
  color: #6b7280;
  font-weight: 400;
}

.rcl-nba-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.rcl-nba-reason {
  font-size: 10px;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 500;
}

.rcl-nba-meta {
  font-size: 11px;
  color: #6b7280;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rcl-nba-modality {
  font-style: italic;
}

.rcl-nba-timing {
  color: #2E7A64;
  font-weight: 500;
}

.rcl-nba-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.rcl-btn--sm {
  font-size: 10px;
  padding: 4px 8px;
}

/* ═══════════════════════════════════════════════════════════
   PHASE 2 — MESSAGE TEMPLATES
═══════════════════════════════════════════════════════════ */

.rcl-modal--wide {
  max-width: 640px;
}

.rcl-tmpl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.rcl-tmpl-item {
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.rcl-tmpl-item:hover {
  border-color: #99f6e4;
  background: #f0fdfb;
}

.rcl-tmpl-item.selected {
  border-color: #2E7A64;
  background: #f0fdfb;
}

.rcl-tmpl-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.rcl-tmpl-name {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
}

.rcl-tmpl-channel {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.rcl-tmpl-channel--whatsapp { background: #dcfce7; color: #166534; }
.rcl-tmpl-channel--email    { background: #dbeafe; color: #1e40af; }
.rcl-tmpl-channel--sms      { background: #fce7f3; color: #9d174d; }

.rcl-tmpl-item-body {
  font-size: 12px;
  color: #6b7280;
}

.rcl-tmpl-preview {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════
   PHASE 2 — WEEKLY OPS TRENDS
═══════════════════════════════════════════════════════════ */

.rcl-trends-table-wrap {
  overflow-x: auto;
}

.rcl-trends-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rcl-trends-table th,
.rcl-trends-table td {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid #f3f4f6;
}

.rcl-trends-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.rcl-trends-label {
  text-align: left !important;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
}

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

/* ═══════════════════════════════════════════════════════════
   PHASE 2 — SETTINGS PAGE
═══════════════════════════════════════════════════════════ */

.rcl-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rcl-settings-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.rcl-settings-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
}

.rcl-settings-card-desc {
  font-size: 12px;
  color: #6b7280;
  margin: 0 0 16px;
}

.rcl-settings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.rcl-settings-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  background: #f9fafb;
}

.rcl-settings-item--inactive {
  opacity: 0.6;
}

.rcl-settings-item-body {
  flex: 1;
  min-width: 0;
}

.rcl-settings-item-name {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
  margin-bottom: 2px;
}

.rcl-settings-item-meta {
  font-size: 11px;
  color: #6b7280;
}

.rcl-settings-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.rcl-settings-add-btn {
  width: 100%;
  padding: 8px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  background: none;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.rcl-settings-add-btn:hover {
  border-color: #2E7A64;
  color: #2E7A64;
}

/* Settings form modal */
.rcl-settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  .rcl-settings-grid {
    grid-template-columns: 1fr;
  }
  .rcl-nba-grid {
    grid-template-columns: 1fr;
  }
}
