/**
 * Rentals Tab Styles - Pipeline/Kanban view for rental applications
 */

/* =============================================
   PIPELINE VIEW
   ============================================= */

.rental-pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  min-height: 400px;
  overflow-x: auto;
  padding-bottom: 1rem;
}

@media (max-width: 1200px) {
  .rental-pipeline {
    grid-template-columns: repeat(6, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .rental-pipeline {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 600px) {
  .rental-pipeline {
    grid-template-columns: 1fr;
  }
}

.pipeline-column {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.75rem;
  min-width: 180px;
  display: flex;
  flex-direction: column;
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.pipeline-header h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0;
}

.pipeline-count {
  background: var(--border);
  color: var(--text-muted);
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Column color accents */
.pipeline-column[data-stage="community_fit"] .pipeline-header h3 { color: #0891b2; }
.pipeline-column[data-stage="community_fit"] .pipeline-header { border-bottom-color: #0891b2; }
.pipeline-column[data-stage="community_fit"] .pipeline-count { background: #ecfeff; color: #0e7490; }

.pipeline-column[data-stage="applications"] .pipeline-header h3 { color: #6366f1; }
.pipeline-column[data-stage="applications"] .pipeline-header { border-bottom-color: #6366f1; }
.pipeline-column[data-stage="applications"] .pipeline-count { background: #eef2ff; color: #4f46e5; }

.pipeline-column[data-stage="approved"] .pipeline-header h3 { color: #8b5cf6; }
.pipeline-column[data-stage="approved"] .pipeline-header { border-bottom-color: #8b5cf6; }
.pipeline-column[data-stage="approved"] .pipeline-count { background: #f5f3ff; color: #7c3aed; }

.pipeline-column[data-stage="contract"] .pipeline-header h3 { color: #f59e0b; }
.pipeline-column[data-stage="contract"] .pipeline-header { border-bottom-color: #f59e0b; }
.pipeline-column[data-stage="contract"] .pipeline-count { background: #fffbeb; color: #d97706; }

.pipeline-column[data-stage="deposit"] .pipeline-header h3 { color: #10b981; }
.pipeline-column[data-stage="deposit"] .pipeline-header { border-bottom-color: #10b981; }
.pipeline-column[data-stage="deposit"] .pipeline-count { background: #ecfdf5; color: #059669; }

.pipeline-column[data-stage="ready"] .pipeline-header h3 { color: #22c55e; }
.pipeline-column[data-stage="ready"] .pipeline-header { border-bottom-color: #22c55e; }
.pipeline-column[data-stage="ready"] .pipeline-count { background: #f0fdf4; color: #16a34a; }

.pipeline-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 100px;
}

/* =============================================
   PIPELINE CARDS
   ============================================= */

.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pipeline-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.pipeline-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.375rem;
  gap: 0.5rem;
  min-width: 0;
}

.pipeline-card .applicant-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.pipeline-card .days-ago {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  white-space: nowrap;
}

.pipeline-card .test-badge {
  font-size: 0.55rem;
  font-weight: 700;
  color: white;
  background: #f59e0b;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pipeline-card .card-body {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pipeline-card .space-name {
  font-weight: 500;
  color: var(--text);
}

.pipeline-card .rate {
  color: var(--accent);
  font-weight: 500;
}

.pipeline-card .card-footer {
  margin-top: 0.5rem;
  padding-top: 0.375rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pipeline-card .sub-status {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 500;
}

/* =============================================
   STATUS BADGES
   ============================================= */

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.inquiry { background: #ecfeff; color: #0e7490; }
.status-badge.invited { background: #cffafe; color: #0e7490; }
.status-badge.submitted { background: #dbeafe; color: #1e40af; }
.status-badge.under-review { background: #fef3c7; color: #92400e; }
.status-badge.approved { background: #d1fae5; color: #065f46; }
.status-badge.denied { background: #fee2e2; color: #991b1b; }
.status-badge.delayed { background: #fef3c7; color: #92400e; }
.status-badge.withdrawn { background: #f3f4f6; color: #6b7280; }

.status-badge.pending { background: #f3f4f6; color: #6b7280; }
.status-badge.generated { background: #dbeafe; color: #1e40af; }
.status-badge.sent { background: #fef3c7; color: #92400e; }
.status-badge.signed { background: #d1fae5; color: #065f46; }

.status-badge.requested { background: #fef3c7; color: #92400e; }
.status-badge.partial { background: #fed7aa; color: #c2410c; }
.status-badge.received { background: #bbf7d0; color: #166534; }
.status-badge.confirmed { background: #86efac; color: #14532d; }

/* =============================================
   DETAIL MODAL TABS
   ============================================= */

.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  background: var(--bg-subtle, #f8f7f5);
  padding: 0.25rem 0.5rem 0;
  border-radius: 6px 6px 0 0;
}

.detail-tab {
  padding: 0.625rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.detail-tab:hover {
  color: var(--text);
}

.detail-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.detail-tab-content {
  display: none;
}

.detail-tab-content.active {
  display: block;
}

/* Event detail modal tabs (same styling as rental) */
.event-detail-tab {
  padding: 0.625rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}

.event-detail-tab:hover {
  color: var(--text);
}

.event-detail-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.event-detail-tab-content {
  display: none;
}

.event-detail-tab-content.active {
  display: block;
}

/* =============================================
   TERMS SAVE STATUS
   ============================================= */

.save-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: opacity 0.3s ease;
}

.save-status.saving {
  color: var(--accent);
}

.save-status.saved {
  color: var(--success, #10b981);
}

.save-status.error {
  color: var(--danger, #ef4444);
}

/* =============================================
   INFO GROUPS
   ============================================= */

.info-group {
  margin-bottom: 0.75rem;
}

.info-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.info-group p {
  font-size: 0.9rem;
  color: var(--text);
  margin: 0;
}

/* =============================================
   DEPOSITS TAB
   ============================================= */

.payment-summary-card {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #f8fafc;
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.payment-summary-title {
  margin: 0 0 1rem 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.payment-summary-card .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.payment-summary-card .summary-row.credit {
  color: #16a34a;
}

.payment-summary-card .summary-row.total {
  font-weight: 700;
  font-size: 1rem;
  padding-top: 0.5rem;
}

.payment-summary-card .summary-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0 0 0.25rem 0;
}

.payment-summary-card .summary-divider {
  border-top: 1px solid var(--border);
  margin: 0.25rem 0;
}

.payment-summary-card .summary-checklist {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.payment-summary-card .checklist-item {
  font-size: 0.85rem;
  padding: 0.25rem 0;
}

.payment-summary-card .checklist-item.done {
  color: #16a34a;
}

.payment-summary-card .checklist-item.pending {
  color: var(--text-muted);
}

.deposits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 600px) {
  .deposits-grid {
    grid-template-columns: 1fr;
  }
}

.deposit-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.deposit-card h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}

.deposit-card .deposit-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem 0;
}

.deposit-card .deposit-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
}

.deposit-card .deposit-status.paid {
  color: #16a34a;
  font-weight: 500;
}

.proration-details {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.85rem;
}

.proration-details p {
  margin: 0.25rem 0;
}

.proration-details .highlight {
  font-weight: 600;
  color: var(--accent);
}

/* =============================================
   DOCUMENTS TAB
   ============================================= */

.document-status {
  margin-bottom: 1rem;
}

.document-status h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.25rem 0;
}

.document-status p {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

.agreement-data-section {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.agreement-data-section h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}

.agreement-data-pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  margin-bottom: 0.75rem;
}

.document-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* =============================================
   LEASE GENERATION (New Documents Tab)
   ============================================= */

.generate-section,
.pdf-section,
.signature-section {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.generate-section h4,
.pdf-section h4,
.signature-section h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}

.lease-preview-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  margin-bottom: 1rem;
  display: none;
}

.lease-preview {
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.lease-preview h2 {
  font-size: 1.1rem;
  margin: 1rem 0 0.5rem 0;
}

.lease-preview h3 {
  font-size: 1rem;
  margin: 0.75rem 0 0.5rem 0;
}

.lease-preview h4 {
  font-size: 0.9rem;
  margin: 0.5rem 0 0.25rem 0;
}

.lease-preview hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.generate-actions,
.pdf-actions,
.signature-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pdf-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pdf-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}

.pdf-link:hover {
  background: var(--bg);
}

.pdf-icon {
  font-size: 1.25rem;
}

.warning-text {
  font-size: 0.85rem;
  color: #d97706;
}

.warning-text a {
  color: var(--accent);
}

.legacy-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.legacy-section summary {
  font-size: 0.85rem;
}

.legacy-section[open] {
  padding-bottom: 0.5rem;
}

/* =============================================
   TEMPLATE EDITOR (Settings Panel)
   ============================================= */

.template-editor-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

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

.template-editor {
  display: flex;
  flex-direction: column;
}

.template-textarea {
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  min-height: 400px;
}

.placeholder-reference {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  max-height: 500px;
  overflow-y: auto;
}

.placeholder-reference h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}

.placeholder-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.placeholder-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.placeholder-item code {
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.8rem;
  background: var(--bg-card);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--accent);
  width: fit-content;
}

.placeholder-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.template-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.template-validation {
  padding: 1rem;
  border-radius: var(--radius);
}

.validation-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 1rem;
  border-radius: var(--radius);
}

.validation-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 1rem;
  border-radius: var(--radius);
}

.validation-error ul,
.validation-warning ul {
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

/* =============================================
   RENT TAB
   ============================================= */

.rent-summary {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.rent-summary p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg);
}

.data-table tbody tr:hover {
  background: var(--bg);
}

/* =============================================
   PAYMENT METHODS
   ============================================= */

.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.payment-method-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.payment-method-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.payment-method-card.inactive {
  opacity: 0.5;
}

.payment-method-card .qr-code {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-method-card .qr-code img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-method-card .qr-placeholder {
  width: 60px;
  height: 60px;
  background: var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.payment-method-card .method-info {
  flex: 1;
  min-width: 0;
}

.payment-method-card .method-name {
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.payment-method-card .method-account {
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
}

.payment-method-card .method-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-top: 0.25rem;
}

/* =============================================
   ACTION BUTTONS
   ============================================= */

.rental-action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rental-action-buttons .btn-primary,
.rental-action-buttons .btn-secondary,
.rental-action-buttons .btn-danger {
  flex: 0 0 auto;
}

/* Deposit request section */
.deposit-request-section {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* =============================================
   APPLICATION HISTORY
   ============================================= */

.application-history {
  max-height: 300px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

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

.history-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.375rem;
  flex-shrink: 0;
}

.history-content {
  flex: 1;
}

.history-action {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.history-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =============================================
   EMPTY STATES
   ============================================= */

.pipeline-empty {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* =============================================
   RATE INPUT GROUP
   ============================================= */

.rate-input-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.rate-input-group:focus-within {
  border-color: var(--accent);
}

.rate-input-group .rate-prefix {
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 500;
  border-right: 1px solid var(--border);
}

.rate-input-group input {
  flex: 1;
  min-width: 80px;
  padding: 0.5rem;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
}

.rate-input-group input:focus {
  outline: none;
}

.rate-input-group select {
  padding: 0.5rem;
  border: none;
  border-left: 1px solid var(--border);
  background: var(--bg);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.rate-input-group select:focus {
  outline: none;
}

/* =============================================
   ASSIGNMENTS TABLE
   ============================================= */

.assignments-table {
  width: 100%;
  border-collapse: collapse;
}

.assignments-table th {
  background: var(--bg);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.625rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
}

.assignments-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.assignments-table tbody tr:hover {
  background: var(--bg);
}

.assignments-table tbody tr.clickable-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.assignments-table tbody tr.clickable-row:hover {
  background: var(--accent-light, #eef2ff);
}

.assignments-table .tenant-cell {
  line-height: 1.3;
}

.assignments-table .tenant-cell strong {
  display: block;
  font-weight: 600;
}

.assignments-table .tenant-email {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.assignments-table .status-badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
}

.assignments-table .status-badge.active {
  background: #d1fae5;
  color: #065f46;
}

.assignments-table .status-badge.pending-contract {
  background: #fef3c7;
  color: #92400e;
}

.assignments-table .status-badge.contract-sent {
  background: #dbeafe;
  color: #1e40af;
}

/* =============================================
   RESERVATIONS CALENDAR
   ============================================= */

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calendar-month-label {
  font-weight: 600;
  min-width: 140px;
  text-align: center;
}

.reservations-calendar {
  overflow-x: auto;
}

.calendar-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.calendar-timeline {
  display: flex;
  flex-direction: column;
  width: max-content; /* Allow timeline to expand based on content */
  min-width: 100%;
}

/* Calendar Header with Days */
.calendar-header {
  display: flex;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
  padding-top: 16px; /* Space for month labels */
}

.calendar-space-label {
  width: 200px;
  min-width: 200px;
  padding: 0.5rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 5;
}

.calendar-days {
  display: flex;
}

.calendar-day {
  width: 30px;
  min-width: 30px;
  flex-shrink: 0;
  text-align: center;
  padding: 0.375rem 0.125rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
}

.calendar-day:last-child {
  border-right: none;
}

.calendar-day .day-num {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text);
}

.calendar-day .day-name {
  font-size: 0.6rem;
  text-transform: uppercase;
}

.calendar-day.weekend {
  background: var(--bg);
}

.calendar-day.today {
  background: var(--accent-light, #eef2ff);
}

.calendar-day.today .day-num {
  color: var(--accent);
  font-weight: 700;
}

/* Calendar Rows */
.calendar-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-height: 48px;
  position: relative;
}

.calendar-row:last-child {
  border-bottom: none;
}

.calendar-row:hover {
  background: var(--bg);
}

.calendar-space-name {
  width: 200px;
  min-width: 200px;
  padding: 0.5rem;
  font-weight: 500;
  font-size: 0.85rem;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 5;
}

.calendar-space-name .space-rate {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.calendar-cells {
  display: flex;
  position: relative;
  overflow: hidden; /* Contain reservation bars */
}

.calendar-cell {
  width: 30px;
  min-width: 30px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  position: relative;
}

.calendar-cell:last-child {
  border-right: none;
}

.calendar-cell.weekend {
  background: var(--bg);
}

.calendar-cell.today {
  background: var(--accent-light, #eef2ff);
}

/* Reservation Bars */
.reservation-bar {
  position: absolute;
  top: 8px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.reservation-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 6;
}

.reservation-bar.active {
  background: linear-gradient(135deg, #10b981, #059669);
}

.reservation-bar.pending_contract {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.reservation-bar.contract_sent {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.reservation-bar.upcoming {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.reservation-bar .bar-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.reservation-bar .tenant-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reservation-bar .bar-details {
  font-size: 0.65rem;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Reservation Tooltip */
.reservation-tooltip {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-width: 280px;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.reservation-tooltip.visible {
  opacity: 1;
}

.reservation-tooltip .tooltip-header {
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--border);
}

.reservation-tooltip .tooltip-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.reservation-tooltip .tooltip-label {
  color: var(--text-muted);
}

.reservation-tooltip .tooltip-value {
  font-weight: 500;
}

/* Empty State */
.calendar-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* Multi-month calendar wrapper */
.calendar-timeline-wrapper {
  display: inline-flex;
  position: relative;
  align-items: stretch;
  min-width: 100%;
}

/* Month labels in header */
.calendar-day .month-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  position: absolute;
  top: -14px;
  left: 0;
  white-space: nowrap;
}

.calendar-day {
  position: relative;
}

.calendar-day.first-of-month {
  border-left: 2px solid var(--accent);
}

.calendar-cell.first-of-month {
  border-left: 2px solid var(--accent);
}

/* Load more column */
.load-more-column {
  width: 80px;
  min-width: 80px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-left: 2px dashed var(--border);
  padding: 1rem 0.5rem;
  position: sticky;
  right: 0;
  z-index: 15;
}

.load-more-column.no-more {
  background: transparent;
}

.load-more-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.load-more-btn:hover {
  background: var(--accent-dark, #4f46e5);
  transform: scale(1.05);
}

.load-more-icon {
  font-size: 1.25rem;
  font-weight: 700;
}

.load-more-text {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.no-more-message {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}


/* Table scroll wrapper for mobile */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .calendar-space-label,
  .calendar-space-name {
    width: 120px;
    min-width: 120px;
    font-size: 0.75rem;
  }

  .calendar-day {
    min-width: 24px;
  }

  .calendar-cell {
    min-width: 24px;
  }

  .reservation-bar {
    font-size: 0.65rem;
    height: 28px;
    top: 6px;
  }

  .load-more-column {
    width: 60px;
    min-width: 60px;
  }

  .load-more-header,
  .no-more-header,
  .load-more-cell,
  .no-more-cell {
    width: 60px;
    min-width: 60px;
  }

  /* Assignments table mobile styles */
  .assignments-table {
    min-width: 600px;
  }

  .assignments-table th,
  .assignments-table td {
    padding: 0.5rem 0.625rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .assignments-table .tenant-cell strong {
    font-size: 0.85rem;
  }

  .assignments-table .tenant-email {
    font-size: 0.7rem;
  }
}

/* =============================================
   FEE SETTINGS & CODES (Square Payments)
   ============================================= */

.fee-settings-grid {
  display: grid;
  gap: 1rem;
}

.fee-setting-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.fee-setting-info {
  flex: 1;
}

.fee-setting-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.fee-setting-info p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fee-setting-amount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fee-setting-amount input {
  width: 100px;
  padding: 0.5rem;
  text-align: right;
  font-size: 1rem;
  font-weight: 600;
}

.fee-codes-grid {
  display: flex;
  flex-direction: column;
}

/* Header row for fee codes table */
.fee-codes-header {
  display: grid;
  grid-template-columns: 100px 1fr 70px 1fr 70px 110px;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* Each fee code row */
.fee-code-row {
  display: grid;
  grid-template-columns: 100px 1fr 70px 1fr 70px 110px;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.fee-code-row:last-child {
  border-bottom: none;
}

.fee-code-row:hover {
  background: var(--bg);
}

.fee-code-row.inactive {
  opacity: 0.5;
}

.fee-code-row.expired {
  opacity: 0.5;
}

.fee-code-row .code-name {
  font-family: monospace;
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.fee-code-row .code-type {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fee-code-row .code-price {
  font-weight: 600;
  font-size: 0.9rem;
}

.fee-code-row .code-price.free {
  color: var(--success);
}

.fee-code-row .code-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fee-code-row .code-usage {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fee-code-row .code-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .fee-codes-header { display: none; }

  .fee-code-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.75rem;
    padding: 0.75rem;
  }

  .fee-code-row .code-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.fee-codes-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Fee Code Modal */
.fee-code-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .fee-code-form .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Square mode badge (legacy ID, now using .settings-badge) */
#squareModeBadge {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
}

#squareModeBadge.live {
  background: #dcfce7;
  color: #166534;
}

/* =============================================
   SETTINGS PAGE — Groups & Cards
   ============================================= */

.settings-page {
  max-width: 900px;
}

/* ---- Group container ---- */
.settings-group {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.settings-group-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.settings-group-header svg {
  color: var(--accent);
  flex-shrink: 0;
}

.settings-group-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.settings-group-header .settings-badge {
  margin-left: auto;
}

/* ---- Card within a group ---- */
.settings-card {
  border-bottom: 1px solid var(--border);
}

.settings-card:last-child {
  border-bottom: none;
}

.settings-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem 0.75rem;
}

.settings-card-header h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-card-header p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.settings-card-header .btn-small {
  flex-shrink: 0;
  align-self: center;
}

.settings-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-self: center;
}

.settings-card-body {
  padding: 0.75rem 1.25rem 1.25rem;
}

.settings-card-body--flush {
  padding: 0;
}

/* ---- Settings badge (reusable) ---- */
.settings-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.settings-badge.live {
  background: #dcfce7;
  color: #166534;
}

/* ---- Toggle row ---- */
.settings-toggle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  cursor: pointer;
  background: var(--bg);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.settings-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.settings-toggle-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.settings-toggle-hint {
  flex-basis: 100%;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 1.4rem;
}

/* ---- Fee setting cards (within settings card) ---- */
.settings-card .fee-settings-grid {
  gap: 0.5rem;
}

.settings-card .fee-setting-card {
  background: var(--bg);
}

/* ---- Fee code rows (within settings card) ---- */

/* ---- Inbound SMS list ---- */
.inbound-sms-list {
  max-height: 400px;
  overflow-y: auto;
}

.inbound-sms-list > div {
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.inbound-sms-list > div:last-child {
  border-bottom: none;
}

.inbound-sms-list > div:hover {
  background: var(--bg);
}

/* ---- Mobile settings ---- */
@media (max-width: 768px) {
  .settings-card-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .settings-card-header .btn-small,
  .settings-card-actions {
    align-self: flex-start;
  }
}

/* =============================================
   STATUS TRACKER (stepper in rental modal)
   ============================================= */

.status-tracker {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: 0.75rem 0.5rem;
  margin-bottom: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tracker-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  flex: 1;
  position: relative;
}

.tracker-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: #f3f4f6;
  border: 2px solid #d1d5db;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
}

.tracker-step.active .tracker-icon {
  background: #eff6ff;
  border-color: #3b82f6;
}

.tracker-step.complete .tracker-icon {
  background: #d1fae5;
  border-color: #10b981;
}

.tracker-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.tracker-step.active .tracker-label {
  color: #3b82f6;
}

.tracker-step.complete .tracker-label {
  color: #10b981;
}

.tracker-detail {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
  text-align: center;
  max-width: 90px;
  line-height: 1.2;
}

.tracker-step.active .tracker-detail {
  color: #2563eb;
  font-weight: 500;
}

.tracker-step.complete .tracker-detail {
  color: #059669;
  font-weight: 500;
}

.tracker-connector {
  flex: 0 0 auto;
  width: 30px;
  height: 2px;
  background: #d1d5db;
  margin-top: 16px;
}

.tracker-step.complete + .tracker-connector,
.tracker-step.active + .tracker-connector {
  background: #10b981;
}

/* Let connector between active and next stay grey */
.tracker-step.active + .tracker-connector {
  background: linear-gradient(90deg, #3b82f6, #d1d5db);
}

/* Inline status for footer buttons */
.tracker-inline-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  background: #f3f4f6;
  color: var(--text-muted);
}

.tracker-inline-status.complete {
  background: #d1fae5;
  color: #065f46;
}

/* Tab status badges */
.tab-badge {
  display: inline-block;
  font-size: 0.6rem;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.tab-badge.complete {
  background: #d1fae5;
  color: #065f46;
}

.tab-badge.active {
  background: #dbeafe;
  color: #1e40af;
}

.tab-badge.warning {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 500px) {
  .status-tracker {
    gap: 0;
    padding: 0.5rem 0.25rem;
  }

  .tracker-step {
    min-width: 55px;
  }

  .tracker-icon {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .tracker-label {
    font-size: 0.6rem;
  }

  .tracker-detail {
    font-size: 0.55rem;
  }

  .tracker-connector {
    width: 16px;
    margin-top: 13px;
  }
}

/* =============================================
   APPLICANT DETAIL PAGE (standalone)
   ============================================= */

.applicant-detail-page {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.applicant-detail-page.hidden {
  display: none;
}

.applicant-detail-header {
  margin-bottom: 1.5rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.btn-back:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.applicant-header-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.applicant-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.applicant-photo-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.applicant-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--text);
}

.applicant-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.meta-item {
  color: var(--text-muted);
}

.meta-item::before {
  content: '';
}

/* Detail page tabs - reuse existing .detail-tabs style but in page context */
.applicant-detail-page .detail-tabs {
  margin-bottom: 1.5rem;
}

/* Detail sections */
.detail-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.detail-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.detail-field {
  min-width: 0;
}

.detail-field.full-width {
  grid-column: 1 / -1;
}

.detail-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.25rem;
}

.detail-field p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.detail-longtext {
  white-space: pre-wrap;
  background: var(--bg-light, #f9fafb);
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem !important;
  line-height: 1.6 !important;
  max-height: 200px;
  overflow-y: auto;
}

.applicant-detail-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Pipeline content wrapper for hide/show */
.rental-pipeline-content {
  /* wrapper class we'll add programmatically */
}

.rental-pipeline-content.hidden {
  display: none;
}

@media (max-width: 768px) {
  .applicant-header-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .applicant-photo-large {
    width: 64px;
    height: 64px;
  }

  .applicant-name {
    font-size: 1.2rem;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .applicant-header-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* =============================================
   ACTION PANE - Wizard-like stage guidance
   ============================================= */

.action-pane {
  background: var(--bg-card);
  border: 2px solid var(--accent, #6366f1);
  border-radius: var(--radius, 8px);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

/* --- Progress Steps (Zone 1) --- */

.action-pane-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
  gap: 0;
  overflow-x: auto;
}

.action-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  flex: 0 1 auto;
}

.action-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f3f4f6;
  border: 2px solid #d1d5db;
  color: #9ca3af;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
}

.action-step.active .action-step-dot {
  background: var(--accent, #6366f1);
  border-color: var(--accent, #6366f1);
  color: white;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.action-step.complete .action-step-dot {
  background: #d1fae5;
  border-color: #10b981;
  color: #059669;
}

.action-step-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #9ca3af;
  text-align: center;
  max-width: 70px;
  white-space: nowrap;
}

.action-step.active .action-step-label {
  color: var(--accent, #6366f1);
  font-weight: 700;
}

.action-step.complete .action-step-label {
  color: #10b981;
}

.action-step-connector {
  flex: 0 0 auto;
  width: 24px;
  height: 2px;
  background: #d1d5db;
  align-self: flex-start;
  margin-top: 14px;
}

.action-step-connector.complete {
  background: #10b981;
}

/* --- Body: Guidance + Actions (Zone 2 + 3) --- */

.action-pane-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
}

.action-pane-guidance {
  flex: 1;
  min-width: 0;
}

.action-pane-instruction {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: #374151;
}

.action-pane-instruction strong {
  color: #111827;
}

/* --- Checklist --- */

.action-pane-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.checklist-row {
  font-size: 0.85rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checklist-row.done {
  color: #059669;
}

.checklist-row.missing {
  color: #dc2626;
}

.checklist-value {
  font-weight: 500;
  color: #374151;
  margin-left: 0.25rem;
}

.action-pane-hint {
  font-size: 0.8rem;
  color: #9ca3af;
  font-style: italic;
  margin-top: 0.5rem;
}

.action-pane-context {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.25rem;
  line-height: 1.5;
}

.action-pane-context strong {
  color: #374151;
  font-weight: 500;
}

/* --- Actions Column (Zone 3) --- */

.action-pane-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: stretch;
}

.action-pane-cta {
  font-size: 1rem !important;
  padding: 0.7rem 1.5rem !important;
  white-space: nowrap;
}

.action-pane-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-pane-waiting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
  padding: 0.5rem 0;
}

.action-pane-waiting .waiting-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  animation: waiting-pulse 1.5s ease-in-out infinite;
}

@keyframes waiting-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* --- Mobile Responsive --- */

@media (max-width: 768px) {
  .action-pane-body {
    flex-direction: column;
    gap: 1rem;
  }

  .action-pane-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .action-pane-actions .btn-primary,
  .action-pane-actions .btn-secondary {
    flex: 1;
    text-align: center;
    min-width: 120px;
  }

  .action-pane-progress {
    padding: 0.5rem;
  }

  .action-step {
    min-width: 42px;
  }

  .action-step-dot {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
  }

  .action-step-label {
    font-size: 0.5rem;
  }

  .action-step-connector {
    width: 12px;
    margin-top: 12px;
  }
}
