/* Componentes Personalizados Granvivir */

/* Logo Component */
.granvivir-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.granvivir-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.granvivir-logo-text {
  display: flex;
  flex-direction: column;
}

.granvivir-logo-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.granvivir-logo-tagline {
  font-size: 12px;
  color: var(--ios-text-secondary);
  margin-top: -2px;
}

/* Dashboard Metrics Card */
.metric-card {
  background: linear-gradient(135deg, var(--ios-secondary-bg) 0%, var(--ios-tertiary-bg) 100%);
  border-radius: var(--ios-radius-large);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(107, 58, 160, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

.metric-label {
  font-size: 13px;
  color: var(--ios-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--ios-text-primary);
  margin: 8px 0;
}

.metric-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
}

.metric-change.positive {
  background: rgba(139, 195, 74, 0.1);
  color: var(--success-color);
}

.metric-change.negative {
  background: rgba(239, 83, 80, 0.1);
  color: var(--danger-color);
}

/* Chart Container */
.chart-container {
  background: var(--ios-secondary-bg);
  border-radius: var(--ios-radius);
  padding: 20px;
  margin: 16px;
  box-shadow: var(--ios-shadow);
}

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

.chart-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ios-text-primary);
}

.chart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ios-text-secondary);
}

.chart-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* Property Card */
.property-card {
  background: var(--ios-secondary-bg);
  border-radius: var(--ios-radius);
  overflow: hidden;
  box-shadow: var(--ios-shadow);
  transition: var(--ios-transition);
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--ios-shadow-hover);
}

.property-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--ios-tertiary-bg) 0%, var(--ios-border) 100%);
}

.property-content {
  padding: 16px;
}

.property-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 8px;
}

.property-badge.available {
  background: rgba(139, 195, 74, 0.1);
  color: var(--success-color);
}

.property-badge.reserved {
  background: rgba(255, 167, 38, 0.1);
  color: var(--warning-color);
}

.property-badge.sold {
  background: rgba(239, 83, 80, 0.1);
  color: var(--danger-color);
}

.property-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ios-text-primary);
  margin-bottom: 4px;
}

.property-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.property-details {
  display: flex;
  gap: 16px;
  color: var(--ios-text-secondary);
  font-size: 13px;
}

.property-detail {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Prospect Card */
.prospect-card {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--ios-secondary-bg);
  border-radius: var(--ios-radius);
  margin-bottom: 8px;
  position: relative;
  transition: var(--ios-transition);
}

.prospect-card:active {
  background: var(--ios-tertiary-bg);
}

.prospect-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
  margin-right: 12px;
}

.prospect-info {
  flex: 1;
}

.prospect-name {
  font-size: 17px;
  font-weight: 500;
  color: var(--ios-text-primary);
  margin-bottom: 2px;
}

.prospect-details {
  font-size: 13px;
  color: var(--ios-text-secondary);
}

.prospect-status {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.prospect-status.hot {
  background: var(--danger-color);
  animation: pulse 2s infinite;
}

.prospect-status.warm {
  background: var(--warning-color);
}

.prospect-status.cold {
  background: var(--ios-text-tertiary);
}

/* Activity Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
  margin: 16px;
}

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

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

.timeline-marker {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ios-secondary-bg);
  border: 2px solid var(--primary-color);
}

.timeline-content {
  background: var(--ios-secondary-bg);
  padding: 12px;
  border-radius: var(--ios-radius);
  box-shadow: var(--ios-shadow);
}

.timeline-time {
  font-size: 12px;
  color: var(--ios-text-tertiary);
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ios-text-primary);
  margin-bottom: 4px;
}

.timeline-description {
  font-size: 13px;
  color: var(--ios-text-secondary);
}

/* Calculator Component */
.calculator-container {
  background: var(--ios-secondary-bg);
  border-radius: var(--ios-radius);
  padding: 20px;
  margin: 16px;
}

.calculator-input-group {
  margin-bottom: 20px;
}

.calculator-slider {
  width: 100%;
  height: 28px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  margin: 10px 0;
}

.calculator-slider::-webkit-slider-track {
  width: 100%;
  height: 4px;
  background: var(--ios-tertiary-bg);
  border-radius: 2px;
}

.calculator-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(107, 58, 160, 0.3);
}

.calculator-result {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 20px;
  border-radius: var(--ios-radius);
  text-align: center;
  margin-top: 20px;
}

.calculator-result-label {
  font-size: 13px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calculator-result-value {
  font-size: 32px;
  font-weight: 700;
  margin: 8px 0;
}

/* Map Lot */
.lot-map-container {
  position: relative;
  background: var(--ios-tertiary-bg);
  border-radius: var(--ios-radius);
  overflow: hidden;
  margin: 16px;
  height: 400px;
}

.lot-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  padding: 16px;
  height: 100%;
}

.lot-item {
  background: var(--ios-secondary-bg);
  border: 2px solid var(--ios-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ios-transition);
  position: relative;
}

.lot-item:hover {
  transform: scale(1.1);
  z-index: 10;
}

.lot-item.available {
  background: rgba(139, 195, 74, 0.1);
  border-color: var(--success-color);
  color: var(--success-color);
}

.lot-item.reserved {
  background: rgba(255, 167, 38, 0.1);
  border-color: var(--warning-color);
  color: var(--warning-color);
}

.lot-item.sold {
  background: rgba(239, 83, 80, 0.1);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.lot-item.construction {
  background: rgba(107, 58, 160, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Document Upload */
.upload-zone {
  border: 2px dashed var(--ios-border);
  border-radius: var(--ios-radius);
  padding: 32px;
  text-align: center;
  background: var(--ios-tertiary-bg);
  transition: var(--ios-transition);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--primary-color);
  background: rgba(107, 58, 160, 0.03);
}

.upload-zone.dragging {
  border-color: var(--primary-color);
  background: rgba(107, 58, 160, 0.1);
}

.upload-icon {
  font-size: 48px;
  color: var(--ios-text-tertiary);
  margin-bottom: 16px;
}

.upload-text {
  font-size: 17px;
  color: var(--ios-text-primary);
  margin-bottom: 4px;
}

.upload-subtext {
  font-size: 13px;
  color: var(--ios-text-secondary);
}

/* File Preview */
.file-preview {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--ios-secondary-bg);
  border-radius: var(--ios-radius);
  margin-top: 8px;
}

.file-icon {
  width: 40px;
  height: 40px;
  background: var(--ios-tertiary-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: var(--primary-color);
}

.file-info {
  flex: 1;
}

.file-name {
  font-size: 15px;
  color: var(--ios-text-primary);
  margin-bottom: 2px;
}

.file-size {
  font-size: 12px;
  color: var(--ios-text-secondary);
}

.file-remove {
  color: var(--danger-color);
  cursor: pointer;
  padding: 8px;
}

/* Chat Bubble */
.chat-message {
  display: flex;
  margin-bottom: 16px;
  align-items: flex-end;
}

.chat-message.sent {
  flex-direction: row-reverse;
}

.chat-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  margin: 0 8px;
  position: relative;
}

.chat-message.received .chat-bubble {
  background: var(--ios-secondary-bg);
  color: var(--ios-text-primary);
}

.chat-message.sent .chat-bubble {
  background: var(--primary-color);
  color: white;
}

.chat-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ios-tertiary-bg);
}

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

.calendar-day {
  background: var(--ios-secondary-bg);
  padding: 8px;
  min-height: 80px;
  position: relative;
}

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

.calendar-day.today {
  background: rgba(107, 58, 160, 0.05);
}

.calendar-day.today .calendar-day-number {
  color: var(--primary-color);
}

.calendar-event {
  font-size: 11px;
  padding: 2px 4px;
  background: var(--primary-color);
  color: white;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Notification Item */
.notification-item {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  background: var(--ios-secondary-bg);
  border-bottom: 0.5px solid var(--ios-separator);
  transition: var(--ios-transition);
}

.notification-item:active {
  background: var(--ios-tertiary-bg);
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 20px;
}

.notification-icon.info {
  background: rgba(107, 58, 160, 0.1);
  color: var(--primary-color);
}

.notification-icon.success {
  background: rgba(139, 195, 74, 0.1);
  color: var(--success-color);
}

.notification-icon.warning {
  background: rgba(255, 167, 38, 0.1);
  color: var(--warning-color);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ios-text-primary);
  margin-bottom: 2px;
}

.notification-message {
  font-size: 13px;
  color: var(--ios-text-secondary);
  margin-bottom: 4px;
}

.notification-time {
  font-size: 12px;
  color: var(--ios-text-tertiary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  font-size: 64px;
  color: var(--ios-text-tertiary);
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ios-text-primary);
  margin-bottom: 8px;
}

.empty-state-message {
  font-size: 15px;
  color: var(--ios-text-secondary);
  margin-bottom: 24px;
}