/* ============================================
   Onboarding Wizard
   ============================================ */

/* Overlay */
.ob-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

/* Container */
.ob-container {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.ob-container.ob-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Progress Bar */
.ob-progress {
  height: 4px;
  background: var(--border);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.ob-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), #8B5CF6);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ob-step-indicator {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  padding: 12px 0 0;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Content area */
.ob-content {
  padding: 40px;
}

@media (max-width: 640px) {
  .ob-content {
    padding: 24px;
  }
}

/* Welcome Screen */
.ob-welcome {
  text-align: center;
  padding: 20px 0;
}

.ob-welcome-icon {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 32px;
}

.ob-icon-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--primary-lighter);
}

.ob-icon-ring-1 {
  inset: 0;
  animation: ob-ring-pulse 3s ease-in-out infinite;
}

.ob-icon-ring-2 {
  inset: -12px;
  opacity: 0.5;
  animation: ob-ring-pulse 3s ease-in-out infinite 0.5s;
}

.ob-icon-ring-3 {
  inset: -24px;
  opacity: 0.25;
  animation: ob-ring-pulse 3s ease-in-out infinite 1s;
}

@keyframes ob-ring-pulse {
  0%, 100% { transform: scale(1); opacity: inherit; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.ob-icon-center {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.ob-icon-center svg {
  width: 40px;
  height: 40px;
}

.ob-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.ob-role-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.ob-role-admin {
  background: #DBEAFE;
  color: #1E40AF;
}

.ob-role-manager {
  background: #D1FAE5;
  color: #065F46;
}

.ob-role-technician {
  background: #FEF3C7;
  color: #92400E;
}

.ob-description {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.ob-welcome-actions {
  margin-bottom: 16px;
}

.ob-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.ob-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.ob-cta svg {
  width: 18px;
  height: 18px;
}

.ob-skip-all {
  display: block;
  margin: 0 auto;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.ob-skip-all:hover {
  color: var(--text-muted);
}

/* Step Content */
.ob-step-content {
  padding: 0;
}

.ob-step-header {
  text-align: center;
  margin-bottom: 28px;
}

.ob-step-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.ob-step-header p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.5;
}

.ob-step-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--primary-lighter);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.ob-step-icon svg {
  width: 28px;
  height: 28px;
}

/* Property Type Grid */
.ob-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .ob-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ob-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.ob-type-card:hover {
  border-color: var(--primary-light);
  background: #F8FAFF;
}

.ob-type-card.selected {
  border-color: var(--primary-light);
  background: var(--primary-lighter);
}

.ob-type-card svg {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}

.ob-type-card.selected svg {
  color: var(--primary);
}

.ob-type-card strong {
  font-size: 13px;
  color: var(--text);
}

.ob-type-card span {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.3;
}

/* Asset Grid */
.ob-asset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .ob-asset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ob-asset-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.ob-asset-card:hover {
  border-color: var(--primary-light);
}

.ob-asset-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ob-asset-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ob-asset-card-inner svg {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.ob-asset-card-inner span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.ob-checkmark {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ob-checkmark svg {
  width: 12px;
  height: 12px;
  color: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.ob-asset-check:checked ~ .ob-asset-card-inner svg {
  color: var(--primary);
}

.ob-asset-check:checked ~ .ob-checkmark {
  background: var(--success);
}

.ob-asset-check:checked ~ .ob-checkmark svg {
  opacity: 1;
}

.ob-asset-card:has(.ob-asset-check:checked) {
  border-color: var(--success);
  background: var(--success-bg);
}

/* Team suggestions */
.ob-team-suggestions {
  margin-bottom: 20px;
}

.ob-suggestion-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.ob-suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ob-chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card-bg);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.ob-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.ob-chip.active {
  border-color: var(--primary-light);
  background: var(--primary-lighter);
  color: var(--primary);
}

/* Form styles */
.ob-form {
  margin-top: 0;
}

.ob-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ob-form-group {
  margin-bottom: 16px;
}

.ob-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.ob-form-group .required {
  color: var(--danger, #DC2626);
}

/* Actions */
.ob-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.ob-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ob-actions .btn svg {
  width: 16px;
  height: 16px;
}

/* Overview Grid (Manager tour) */
.ob-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

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

.ob-overview-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s;
}

.ob-overview-card:hover {
  border-color: var(--primary-lighter);
  background: #FAFBFF;
}

.ob-overview-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-lighter);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ob-overview-icon svg {
  width: 20px;
  height: 20px;
}

.ob-overview-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ob-overview-text strong {
  font-size: 14px;
  color: var(--text);
}

.ob-overview-text span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Complete Screen */
.ob-complete {
  text-align: center;
  padding: 20px 0;
}

.ob-complete-animation {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.ob-check-circle svg {
  width: 80px;
  height: 80px;
}

.ob-check-bg {
  stroke: var(--success);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: ob-circle-draw 0.6s ease forwards;
}

.ob-check-mark {
  stroke: var(--success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: ob-check-draw 0.4s ease forwards 0.5s;
}

@keyframes ob-circle-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes ob-check-draw {
  to { stroke-dashoffset: 0; }
}

/* Confetti */
.ob-confetti {
  position: absolute;
  inset: -40px;
  pointer-events: none;
}

.ob-confetti::before,
.ob-confetti::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ob-confetti::before {
  background: var(--primary-light);
  top: 0;
  left: 10px;
  animation: ob-confetti-1 1s ease-out forwards;
}

.ob-confetti::after {
  background: #F59E0B;
  top: 10px;
  right: 10px;
  animation: ob-confetti-2 1s ease-out forwards 0.1s;
}

@keyframes ob-confetti-1 {
  0% { transform: translate(0) scale(0); opacity: 1; }
  100% { transform: translate(-30px, -50px) scale(1); opacity: 0; }
}

@keyframes ob-confetti-2 {
  0% { transform: translate(0) scale(0); opacity: 1; }
  100% { transform: translate(30px, -40px) scale(1); opacity: 0; }
}

/* Summary */
.ob-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  margin: 0 auto 28px;
  padding: 16px;
  background: var(--bg, #F1F5F9);
  border-radius: 10px;
}

.ob-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.ob-summary-item svg {
  width: 16px;
  height: 16px;
  color: var(--success);
  flex-shrink: 0;
}

/* Quick Actions */
.ob-quick-actions {
  margin-bottom: 28px;
}

.ob-quick-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.ob-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
}

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

.ob-quick-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.ob-quick-card:hover {
  border-color: var(--primary-lighter);
  background: #FAFBFF;
  transform: translateX(2px);
}

.ob-quick-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ob-quick-icon svg {
  width: 18px;
  height: 18px;
}

.ob-quick-card span {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.ob-quick-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-light);
}

/* ============================================
   Setup Checklist (Dashboard)
   ============================================ */

.setup-checklist {
  background: linear-gradient(135deg, #1E293B, #334155);
  border-radius: 12px;
  padding: 24px;
  color: white;
  margin-bottom: 24px;
}

.setup-checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.setup-checklist-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.setup-checklist-header p {
  font-size: 13px;
  color: #94A3B8;
}

.setup-checklist-dismiss {
  background: none;
  border: none;
  color: #64748B;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.setup-checklist-dismiss:hover {
  color: #94A3B8;
}

.setup-checklist-dismiss svg {
  width: 18px;
  height: 18px;
}

.setup-checklist-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}

.setup-checklist-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #34D399);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.setup-checklist-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 768px) {
  .setup-checklist-items {
    grid-template-columns: 1fr;
  }
}

.setup-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: white;
}

.setup-checklist-item:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: white;
}

.setup-checklist-item.completed {
  opacity: 0.5;
}

.setup-item-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.setup-checklist-item.completed .setup-item-check {
  background: #10B981;
  border-color: #10B981;
}

.setup-item-check svg {
  width: 12px;
  height: 12px;
  color: white;
  opacity: 0;
}

.setup-checklist-item.completed .setup-item-check svg {
  opacity: 1;
}

.setup-item-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.setup-item-text strong {
  font-size: 13px;
  font-weight: 600;
}

.setup-item-text span {
  font-size: 11px;
  color: #94A3B8;
}

.setup-checklist-item.completed .setup-item-text strong {
  text-decoration: line-through;
  opacity: 0.7;
}

/* btn-lg for onboarding */
.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: 10px;
}

/* ============================================
   Tooltip System
   ============================================ */

.tip-trigger {
  position: relative;
  cursor: help;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tip-badge-icon {
  width: 15px;
  height: 15px;
  color: var(--text-light);
  opacity: 0.5;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.tip-trigger:hover .tip-badge-icon {
  opacity: 1;
  color: var(--primary-light);
}

h1 .tip-trigger {
  vertical-align: middle;
  margin-left: 4px;
}

h1 .tip-badge-icon {
  width: 18px;
  height: 18px;
}

.tip-popup {
  position: fixed;
  z-index: 10001;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  width: 300px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

.tip-popup.tip-visible {
  opacity: 1;
  transform: translateY(0);
}

.tip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tip-icon {
  width: 16px;
  height: 16px;
  color: var(--primary-light);
  flex-shrink: 0;
}

.tip-header strong {
  font-size: 14px;
  color: var(--text);
}

.tip-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 8px;
}

.tip-connections {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--primary-light);
  font-weight: 500;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.tip-conn-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ============================================
   Enhanced Empty States
   ============================================ */

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--primary-lighter);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.empty-state-icon svg {
  width: 32px;
  height: 32px;
}

.empty-state-desc {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.empty-state-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  max-width: 600px;
  margin: 0 auto 24px;
  text-align: left;
}

.empty-state-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.empty-state-feature svg {
  width: 18px;
  height: 18px;
  color: var(--primary-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.empty-state-feature div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.empty-state-feature strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.empty-state-feature span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.empty-state-connections {
  margin-bottom: 20px;
}

.empty-state-conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--primary-light);
  font-weight: 500;
  background: var(--primary-lighter);
  padding: 4px 12px;
  border-radius: 20px;
}

.empty-state-conn svg {
  width: 12px;
  height: 12px;
}

/* ============================================
   Suggested Next Steps
   ============================================ */

.next-steps-section {
  margin-bottom: 24px;
}

.next-steps-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.next-steps-title svg {
  width: 18px;
  height: 18px;
  color: var(--warning);
}

.next-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.next-step-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.next-step-card:hover {
  border-color: var(--primary-lighter);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.next-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.next-step-icon svg {
  width: 22px;
  height: 22px;
}

.next-step-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.next-step-text strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.next-step-text span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.next-step-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-light);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.next-step-card:hover .next-step-arrow {
  transform: translateX(3px);
  color: var(--primary-light);
}

/* ============================================
   Welcome Back Card
   ============================================ */

.welcome-back-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #EFF6FF, #F0FDF4);
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.wb-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.wb-greeting {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wb-greeting strong {
  font-size: 15px;
  color: var(--text);
}

.wb-greeting span {
  font-size: 12px;
  color: var(--text-muted);
}

.wb-alerts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wb-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.wb-alert svg {
  width: 14px;
  height: 14px;
}

.wb-alert-danger {
  background: var(--danger-bg, #FEE2E2);
  color: var(--danger, #DC2626);
}

.wb-alert-info {
  background: var(--primary-lighter, #DBEAFE);
  color: var(--primary, #1E40AF);
}

.wb-dismiss {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
}

.wb-dismiss:hover {
  color: var(--text-muted);
}

.wb-dismiss svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Section Intro Banners
   ============================================ */

.section-intro-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--banner-color, var(--primary-light));
  border-radius: 8px;
  margin-bottom: 20px;
  animation: banner-slide-in 0.3s ease;
}

@keyframes banner-slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-intro-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-intro-icon svg {
  width: 20px;
  height: 20px;
}

.section-intro-text {
  flex: 1;
}

.section-intro-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.section-intro-text p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.section-intro-dismiss {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.section-intro-dismiss:hover {
  color: var(--text-muted);
}

.section-intro-dismiss svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Sidebar Discovery Indicators
   ============================================ */

.nav-item-new::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3B82F6;
  margin-left: auto;
  flex-shrink: 0;
  animation: sidebar-pulse 2s ease-in-out infinite;
}

@keyframes sidebar-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ============================================
   Stat Counter Animation
   ============================================ */

.stat-value {
  transition: color 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .nav-item-new::after {
    animation: none;
    opacity: 0.6;
  }

  .section-intro-banner {
    animation: none;
  }
}

/* ============================================
   Kanban Board
   ============================================ */

.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 400px;
}

.kanban-column {
  min-width: 280px;
  flex: 1;
  background: var(--bg);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px 10px 0 0;
}

.kanban-column-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.kanban-column-count {
  background: rgba(0,0,0,0.08);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.kanban-column-body {
  padding: 8px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.kanban-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.kanban-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.kanban-card-id {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.kanban-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  padding: 24px 8px;
}

.icon-xs {
  width: 12px;
  height: 12px;
}

/* ============================================
   View Toggle
   ============================================ */

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 16px;
  width: fit-content;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.view-btn:hover {
  color: var(--text);
}

.view-btn.active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Bulk Action Bar
   ============================================ */

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--primary);
  color: white;
  border-radius: 0 0 8px 8px;
  font-size: 13px;
  font-weight: 500;
}

.bulk-bar .form-control {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.2);
  color: white;
}

.bulk-bar .btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
}

.bulk-bar .btn:hover {
  background: rgba(255,255,255,0.3);
}

/* ============================================
   Calendar View
   ============================================ */

.calendar-view {
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.cal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.cal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}

.cal-weekday {
  padding: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-cell {
  min-height: 90px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4px;
}

.cal-cell:nth-child(7n) {
  border-right: none;
}

.cal-empty {
  background: var(--bg);
}

.cal-today {
  background: #EFF6FF;
}

.cal-day {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 4px;
  margin-bottom: 2px;
}

.cal-today .cal-day {
  color: var(--primary);
  background: var(--primary-lighter);
  border-radius: 4px;
  display: inline-block;
}

.cal-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: background 0.15s;
  overflow: hidden;
}

.cal-item:hover {
  background: rgba(0,0,0,0.05);
}

.cal-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-item-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.cal-more {
  font-size: 10px;
  color: var(--primary-light);
  padding: 1px 4px;
  font-weight: 500;
}

/* ============================================
   Global Search
   ============================================ */

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  transition: opacity 0.2s;
}

.search-overlay.search-visible {
  opacity: 1;
}

.search-dialog {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  width: 580px;
  max-width: 95vw;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.search-input-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: none;
  color: var(--text);
}

.search-kbd {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted);
}

.search-results {
  overflow-y: auto;
  flex: 1;
}

.search-hints {
  padding: 16px 18px;
}

.search-hint-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.search-hint-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.search-hint-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}

.search-hint-item:hover {
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
}

.search-hint-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-group {
  padding: 4px 0;
}

.search-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 8px 18px 4px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.1s;
}

.search-result-item:hover {
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
}

.search-result-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-result-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.search-result-text strong {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-text mark {
  background: #FEF3C7;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.search-empty, .search-loading {
  padding: 40px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.search-empty svg {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  opacity: 0.4;
}

/* ============================================
   Trend Chart
   ============================================ */

.trend-chart {
  padding: 8px 0;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 100px;
  padding: 0 8px;
}

.trend-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.trend-bar-pair {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 80px;
}

.trend-bar {
  width: 14px;
  border-radius: 3px 3px 0 0;
  transition: height 0.5s ease;
}

.trend-bar-created {
  background: #3B82F6;
}

.trend-bar-completed {
  background: #10B981;
}

.trend-bar-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.trend-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.trend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* ============================================
   Dark Mode
   ============================================ */

[data-theme="dark"] {
  --primary: #3B82F6;
  --primary-light: #60A5FA;
  --primary-lighter: #1E3A5F;
  --sidebar-bg: #0B1120;
  --bg: #0F172A;
  --card-bg: #1E293B;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.3);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.4);
  --text: #E2E8F0;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  --border: #334155;
  --input-border: #475569;
  --input-focus: #60A5FA;
  --critical-bg: #450A0A;
  --high-bg: #451A03;
  --medium-bg: #1E3A5F;
  --low-bg: #1E293B;
  --success-bg: #052E16;
  --warning-bg: #451A03;
  --danger-bg: #450A0A;
}

[data-theme="dark"] .form-control {
  background: #0F172A;
  border-color: #475569;
  color: #E2E8F0;
}

[data-theme="dark"] .table th {
  background: #0F172A;
  color: #94A3B8;
}

[data-theme="dark"] .table td {
  border-color: #334155;
}

[data-theme="dark"] .kanban-column {
  background: #0F172A;
}

[data-theme="dark"] .cal-empty {
  background: #0B1120;
}

[data-theme="dark"] .cal-today {
  background: #1E3A5F;
}

[data-theme="dark"] .search-result-text mark {
  background: #854D0E;
}

[data-theme="dark"] .login-card {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .modal {
  background: #1E293B;
}

/* ============================================
   Dark Mode Toggle Button
   ============================================ */

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  #sidebar, #topbar, .btn, .toast-container, .notification-panel, .bulk-bar, .view-toggle, .filters-bar {
    display: none !important;
  }

  #content-wrapper {
    margin-left: 0 !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  body {
    background: white;
    color: black;
  }
}

/* ============================================
   CSV Export Button
   ============================================ */

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.export-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.export-btn svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   Invoice 3-Way Match
   ============================================ */

.match-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.match-item {
  text-align: center;
  padding: 12px 24px;
  background: var(--bg);
  border-radius: 10px;
}

.match-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.match-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.match-arrow {
  color: var(--text-light);
}

.match-arrow svg {
  width: 20px;
  height: 20px;
}

.match-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.match-ok {
  background: var(--success-bg);
  color: var(--success);
}

.match-warn {
  background: var(--warning-bg);
  color: var(--warning);
}

.match-result svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   Integration Cards
   ============================================ */

.integration-card {
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.integration-card:hover {
  border-color: var(--primary-lighter);
}

/* ============================================
   Filter Chips
   ============================================ */

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card-bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================
   Invoice Line Item Form
   ============================================ */

.inv-line-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

/* ============================================
   Bid Cards
   ============================================ */

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

.bid-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--card-bg);
  transition: all 0.15s;
}

.bid-card:hover {
  border-color: var(--primary-lighter);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bid-card-selected {
  border-color: var(--success);
  background: var(--success-bg);
}

.bid-card-rejected {
  opacity: 0.5;
}

.bid-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.bid-card-header strong {
  font-size: 15px;
  color: var(--text);
}

.bid-card-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.bid-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.bid-lowest {
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  background: var(--success-bg);
  padding: 2px 8px;
  border-radius: 10px;
}

.bid-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.bid-card-details span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bid-card-breakdown {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.bid-cat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 3px 0;
  color: var(--text-muted);
}

.bid-cat-row span:last-child {
  font-weight: 600;
  color: var(--text);
}

.bid-terms {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0;
  line-height: 1.4;
}

.bid-terms strong {
  color: var(--text);
}

.bid-terms-warn {
  color: var(--warning);
}

.bid-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ============================================
   Comparison Table
   ============================================ */

.compare-table th {
  white-space: nowrap;
}

.compare-table td {
  white-space: nowrap;
}

.bid-item-row {
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

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

/* ============================================
   Property Hub
   ============================================ */

.prop-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.prop-info-bar span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.prop-stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .prop-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.prop-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
  transition: all 0.15s;
}

.prop-stat:hover {
  border-color: var(--primary-lighter);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.prop-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.prop-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.prop-stat-alert {
  font-size: 11px;
  font-weight: 600;
  color: var(--danger);
  margin-top: 4px;
}

.prop-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.prop-pm-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

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

.prop-pm-item:hover {
  background: var(--bg);
  margin: 0 -16px;
  padding: 10px 16px;
}

.prop-pm-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.prop-wo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

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

.prop-wo-item:hover {
  background: var(--bg);
  margin: 0 -16px;
  padding: 10px 16px;
}

.prop-wo-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prop-wo-info strong {
  font-size: 13px;
}

.prop-activity-item {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  align-items: flex-start;
}

.prop-activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-light);
  margin-top: 7px;
  flex-shrink: 0;
}

.prop-activity-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.prop-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.prop-team-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.prop-team-card strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.prop-team-card .text-muted {
  display: block;
  font-size: 12px;
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* ============================================
   QR Code System
   ============================================ */

.qr-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.qr-preview {
  padding: 16px;
  background: white;
  border-radius: 12px;
  border: 2px solid var(--border);
}

.qr-image {
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
}

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

.qr-entity-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.qr-entity-type {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.qr-entity-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.qr-url {
  font-size: 11px;
  color: var(--text-light);
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 6px;
  word-break: break-all;
  max-width: 100%;
}

.qr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.qr-thumbnail {
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s;
}

.qr-thumbnail:hover {
  transform: scale(1.05);
}

[data-theme="dark"] .qr-preview {
  background: white;
}

[data-theme="dark"] .qr-image {
  filter: none;
}

/* ============================================
   Location Detail
   ============================================ */

.location-procedures-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.location-procedure-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.location-procedure-card:hover {
  border-color: var(--primary-lighter);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateX(2px);
}

.location-procedure-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-lighter);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.location-procedure-icon svg {
  width: 20px;
  height: 20px;
}

.location-procedure-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.location-procedure-info strong {
  font-size: 14px;
  color: var(--text);
}

.location-procedure-info span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================
   Request Portal Cards
   ============================================ */

.request-portal-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.request-portal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 10px;
  gap: 12px;
  transition: background 0.15s;
}

.request-portal-card:hover {
  background: var(--primary-lighter, #DBEAFE);
}

.request-portal-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.request-portal-info strong {
  font-size: 14px;
  color: var(--text);
}

.request-portal-info span {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-portal-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ============================================
   Sidebar Section Groups
   ============================================ */

.nav-section {
  margin-bottom: 2px;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  color: #64748B;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: color 0.15s;
  font-family: inherit;
  margin-top: 8px;
}

.nav-section-header:hover {
  color: #94A3B8;
}

.nav-section-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.nav-section.collapsed .nav-section-chevron {
  transform: rotate(-90deg);
}

.nav-section-items {
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  opacity: 1;
}

.nav-section.collapsed .nav-section-items {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.nav-item-help {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 10px;
}

/* Adjust sidebar-nav to push help to bottom */
.sidebar-nav {
  display: flex;
  flex-direction: column;
}

/* ============================================
   Bid Management System
   ============================================ */

/* Scoring Stars */
.score-criteria {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.score-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  min-width: 160px;
}

.score-stars {
  display: flex;
  gap: 4px;
}

.score-star {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: var(--border);
  transition: color 0.1s, transform 0.1s;
}

.score-star:hover {
  transform: scale(1.15);
}

.score-star.filled {
  color: #F59E0B;
}

.score-star-display {
  width: 14px;
  height: 14px;
  color: #F59E0B;
}

.score-star-empty {
  width: 14px;
  height: 14px;
  color: var(--border);
}

.score-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  min-width: 32px;
  text-align: center;
}

/* Scoring Matrix */
.scoring-matrix {
  overflow-x: auto;
}

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

.scoring-matrix th,
.scoring-matrix td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.scoring-matrix th:first-child,
.scoring-matrix td:first-child {
  text-align: left;
  font-weight: 600;
}

.scoring-matrix th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Progress Bar */
.project-progress {
  margin-bottom: 20px;
}

.project-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.project-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.project-progress-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.project-progress-track {
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
}

.project-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), #10B981);
  border-radius: 5px;
  transition: width 0.5s ease;
}

/* Quick Stats Row for Projects */
.project-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.project-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.project-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.project-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.project-stat-sub {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
}

/* Enhanced Bid Cards */
.bid-card-score {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #F59E0B;
}

.bid-card-comments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

.bid-card-comments:hover {
  color: var(--primary);
}

.bid-card-cpd {
  font-size: 12px;
  color: var(--text-muted);
}

.bid-rejection-reason {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--danger-bg, #FEE2E2);
  border-radius: 6px;
  font-size: 12px;
  color: var(--danger, #DC2626);
}

/* Milestones */
.milestone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.milestone-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  position: relative;
}

.milestone-item.completed {
  opacity: 0.7;
}

.milestone-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 2px;
}

.milestone-check:hover {
  border-color: var(--success);
}

.milestone-item.completed .milestone-check {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.milestone-check svg {
  width: 14px;
  height: 14px;
}

.milestone-info {
  flex: 1;
}

.milestone-info strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.milestone-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.milestone-item.completed .milestone-info strong {
  text-decoration: line-through;
}

.milestone-due {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Change Orders */
.change-order-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.change-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
  gap: 12px;
}

.change-order-info {
  flex: 1;
}

.change-order-info strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.change-order-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.change-order-amount {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.change-order-amount.positive {
  color: var(--danger);
}

.change-order-amount.negative {
  color: var(--success);
}

/* Activity Feed */
.project-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

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

.project-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-light);
  margin-top: 5px;
  flex-shrink: 0;
}

.project-activity-text {
  flex: 1;
  color: var(--text);
  line-height: 1.4;
}

.project-activity-time {
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
}

/* Bid Comments Thread */
.bid-comments-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.bid-comment {
  display: flex;
  gap: 10px;
}

.bid-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.bid-comment-body {
  flex: 1;
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 14px;
}

.bid-comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.bid-comment-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.bid-comment-time {
  font-size: 11px;
  color: var(--text-light);
}

.bid-comment-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

/* Invited Vendors */
.invited-vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.invited-vendor-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.invited-vendor-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.invited-vendor-info {
  flex: 1;
  min-width: 0;
}

.invited-vendor-info strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.invited-vendor-info span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Deadline Countdown */
.deadline-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.deadline-ok {
  background: var(--success-bg);
  color: var(--success);
}

.deadline-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

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

/* Status Transition */
.status-flow {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.status-step {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--card-bg);
}

.status-step:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.status-step.current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.status-step.done {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success);
}

.status-arrow {
  color: var(--text-light);
  font-size: 12px;
}

/* Budget vs Bid Visualization */
.budget-viz {
  position: relative;
  height: 40px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.budget-range {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--success-bg);
  border-left: 2px solid var(--success);
  border-right: 2px solid var(--success);
}

.budget-range-label {
  position: absolute;
  top: -18px;
  font-size: 10px;
  font-weight: 600;
  color: var(--success);
}

.bid-marker {
  position: absolute;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: white;
  transform: translateX(-50%);
  z-index: 1;
}

/* ============================================
   Attachments
   ============================================ */

.attachments-section {
  padding: 4px 0;
}

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

.attachments-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.attachments-actions {
  display: flex;
  gap: 6px;
}

.attachments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: var(--text-light);
  font-size: 13px;
}

.attachments-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attachment-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.1s;
}

.attachment-file:hover {
  background: var(--bg);
}

.attachment-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.attachment-icon {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.attachment-icon svg {
  width: 20px;
  height: 20px;
}

.attachment-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.attachment-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-name:hover {
  color: var(--primary);
  text-decoration: none;
}

.attachment-meta {
  font-size: 11px;
  color: var(--text-light);
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.upload-area:hover,
.upload-drag-over {
  border-color: var(--primary-light);
  background: var(--primary-lighter, #EFF6FF);
}

.upload-area-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
