/* ============================================
   BIANO STORE - Additional Component Styles
   ============================================ */

/* ============================================
   CRM FUNNEL
   ============================================ */
.funnel-stages {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.funnel-stage {
  min-width: 230px;
  max-width: 230px;
  background: var(--bg-page);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.funnel-stage-header {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.funnel-stage-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100px;
}

.crm-card {
  background: white;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

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

.crm-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.crm-card-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-green);
}

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

/* ============================================
   CALENDAR
   ============================================ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.calendar-day-header {
  background: var(--bg-page);
  padding: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-day {
  background: white;
  min-height: 100px;
  padding: 6px;
  position: relative;
  cursor: pointer;
  transition: background 0.1s;
}

.calendar-day:hover { background: #f8f9ff; }

.calendar-day.today { background: var(--color-blue-light); }

.calendar-day.other-month { background: var(--bg-page); opacity: 0.6; }

.calendar-day-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.calendar-day.today .calendar-day-number {
  color: var(--color-blue);
  font-weight: 800;
}

.calendar-event {
  display: block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  color: white;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   PRODUCT CATALOG
   ============================================ */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: white;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-img {
  width: 100%;
  height: 140px;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.product-info {
  padding: 14px;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.product-line {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-green);
}

.product-price.no-price {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ============================================
   QUOTES / ORÇAMENTOS
   ============================================ */
.quote-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.quote-items-table thead th {
  background: #f8f9ff;
}

.quote-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: 16px;
  background: var(--bg-page);
  border-radius: var(--border-radius);
  margin-top: 16px;
}

.quote-total-line {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 13px;
}

.quote-total-line.grand {
  font-size: 18px;
  font-weight: 700;
  border-top: 2px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}

/* ============================================
   CONTRACTS
   ============================================ */
.contract-card {
  background: white;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}

.contract-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.contract-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-blue);
}

.contract-card.signed::before { background: var(--color-green); }
.contract-card.pending::before { background: var(--color-orange); }
.contract-card.expired::before { background: var(--color-red); }

.contract-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.contract-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contract-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* ============================================
   TIMELINE / CRONOGRAMA
   ============================================ */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-dot {
  position: absolute;
  left: -22px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border-color);
  z-index: 1;
}

.timeline-dot.done {
  background: var(--color-green);
  border-color: var(--color-green);
}

.timeline-dot.active {
  background: var(--color-blue);
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px var(--color-blue-light);
}

.timeline-dot.delayed {
  background: var(--color-red);
  border-color: var(--color-red);
}

.timeline-content {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 14px;
}

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

.timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================
   CHARTS WRAPPER
   ============================================ */
.chart-container {
  position: relative;
  width: 100%;
}

/* ============================================
   OBRA / MONTAGEM CARD
   ============================================ */
.obra-card {
  background: white;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.15s;
}

.obra-card:hover {
  box-shadow: var(--shadow-md);
}

.obra-card-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.obra-card-status-bar.em-andamento { background: var(--color-orange); }
.obra-card-status-bar.concluida { background: var(--color-green); }
.obra-card-status-bar.parada { background: var(--color-red); }
.obra-card-status-bar.programada { background: var(--color-blue); }

.obra-code {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.obra-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.obra-client {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.obra-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.obra-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.obra-check-item.done {
  color: var(--color-green);
  text-decoration: line-through;
}

.check-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.check-circle.done {
  background: var(--color-green);
  border-color: var(--color-green);
  color: white;
}

/* ============================================
   PURCHASE / COMPRAS LIST
   ============================================ */
.purchase-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.1s;
}

.purchase-item:hover { background: #f8f9ff; }

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

.purchase-item-check {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.purchase-item-check.checked {
  background: var(--color-green);
  border-color: var(--color-green);
  color: white;
  font-size: 11px;
}

.purchase-item-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.purchase-item-qty {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-page);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ============================================
   REPORT CARDS
   ============================================ */
.report-metric {
  text-align: center;
  padding: 20px;
}

.report-metric-value {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 8px;
}

.report-metric-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   HISTORY LOG
   ============================================ */
.history-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.history-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

.history-text {
  flex: 1;
}

.history-action {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
}

.history-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================
   FOLLOW UP ALERTS
   ============================================ */
.followup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-orange-light);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--color-orange);
  margin-bottom: 8px;
}

.followup-item .avatar-sm {
  background: var(--color-orange);
  width: 32px;
  height: 32px;
}

.followup-info { flex: 1; }

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

.followup-days {
  font-size: 11px;
  color: var(--color-orange);
  font-weight: 600;
}

/* ============================================
   SWITCHER (view toggle)
   ============================================ */
.view-switcher {
  display: flex;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 3px;
  gap: 2px;
}

.view-switch-btn {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-family: var(--font);
}

.view-switch-btn:hover {
  color: var(--text-primary);
  background: white;
}

.view-switch-btn.active {
  background: white;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   VENDOR / FORNECEDOR TAGS
   ============================================ */
.vendor-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

/* ============================================
   NOTIFICATION DOT
   ============================================ */
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-red);
  display: inline-block;
  flex-shrink: 0;
}
