/* ==================== DESIGNER CRIATIVA ==================== */

#designer-system {
  display: none;
  min-height: 100vh;
  padding: 0;
  position: relative;
  z-index: 1;
}

#designer-system.active {
  display: block;
}

/* ==================== CONTAINER ==================== */

.designer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* ==================== TABS ==================== */

.designer-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  background: white;
  padding: 12px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow-x: auto;
  scrollbar-width: none;
}

.designer-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1;
  min-width: 150px;
  padding: 14px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  color: #6b7280;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.tab-btn:active {
  transform: scale(0.98);
}

.tab-btn.active {
  background: var(--pt100);
  color: white;
  border-color: var(--pt100);
  box-shadow: 0 4px 12px rgba(33, 37, 41, 0.2);
}

.tab-btn i {
  font-size: 20px;
}

.tab-badge {
  background: #dc3545;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  min-width: 22px;
  text-align: center;
}

.tab-btn.active .tab-badge {
  background: rgba(255,255,255,0.3);
}

/* ==================== TAB CONTENT ==================== */

.tab-content {
  display: none;
}

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

/* ==================== FILTROS ==================== */

.approved-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-select {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pt75);
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: var(--pt100);
  box-shadow: 0 0 0 3px rgba(33, 37, 41, 0.1);
}

/* ==================== LISTA DE SOLICITAÇÕES ==================== */

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

.loading-state,
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #9ca3af;
  text-align: center;
}

.loading-state i,
.empty-state i {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.loading-state .ph-spinner {
  animation: spin 1s linear infinite;
}

.empty-state small {
  font-size: 12px;
  color: #dc3545;
  margin-top: 8px;
  display: block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.empty-state p,
.loading-state p {
  font-size: 16px;
  font-weight: 600;
  color: #6b7280;
  margin: 0;
}

/* ==================== CARD DE SOLICITAÇÃO ==================== */

.request-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.request-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: var(--pt100);
}

.request-card:active {
  transform: translateY(-2px);
}

.request-card.recusado {
  border-left: 4px solid #dc3545;
}

.request-card.pendente {
  border-left: 4px solid #ffc107;
}

.request-card.aprovado {
  border-left: 4px solid #28a745;
}

.request-card.em-andamento {
  border-left: 4px solid #17a2b8;
}

.request-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f3f4f6;
}

.request-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f3f4f6;
  flex-shrink: 0;
}

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

.request-client {
  font-size: 15px;
  font-weight: 700;
  color: var(--pt100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-date {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.request-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.status-pendente {
  background: #fff3cd;
  color: #856404;
}

.status-recusado {
  background: #f8d7da;
  color: #721c24;
}

.status-aprovado {
  background: #d4edda;
  color: #155724;
}

.status-em-andamento {
  background: #d1ecf1;
  color: #0c5460;
}

.request-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.request-theme {
  font-size: 16px;
  font-weight: 700;
  color: var(--pt100);
}

.request-description {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.request-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.request-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.request-meta i {
  font-size: 16px;
}

/* ==================== MODAL DETALHES ==================== */

.modal-large {
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
}

.request-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.details-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

.section-header i {
  font-size: 20px;
  color: var(--pt100);
}

.section-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--pt100);
  margin: 0;
  flex: 1;
}

.client-details {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  padding: 14px;
  border-radius: 10px;
}

.client-details-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f3f4f6;
  flex-shrink: 0;
}

.client-details-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--pt100);
  margin-bottom: 4px;
}

.client-details-meta {
  font-size: 13px;
  color: #6b7280;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.detail-item {
  background: white;
  padding: 12px 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.detail-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--pt100);
  word-break: break-word;
}

/* ==================== MÍDIAS GRID ==================== */

.medias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.media-thumb {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.media-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-thumb-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.6);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  pointer-events: none;
}

/* ==================== MENSAGENS ==================== */

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  background: white;
  border-radius: 12px;
  padding: 12px;
  max-width: 70%;
}

.message-admin {
  align-self: flex-start;
  border-left: 4px solid #17a2b8;
}

.message-user {
  align-self: flex-end;
  border-left: 4px solid var(--pt100);
}

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

.message-author {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
}

.message-time {
  font-size: 10px;
  color: #9ca3af;
}

.message-text {
  font-size: 14px;
  color: var(--pt100);
  line-height: 1.5;
  word-break: break-word;
}

.message-media {
  max-width: 300px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.message-media img,
.message-media video {
  width: 100%;
  display: block;
}

.message-media i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  pointer-events: none;
}

/* ==================== AÇÕES ==================== */

.details-actions {
  display: flex;
  gap: 12px;
  padding-top: 10px;
}

.btn-upload-media {
  flex: 1;
}

/* ==================== UPLOAD MODAL ==================== */

.upload-area {
  border: 3px dashed #e5e7eb;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8f9fa;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--pt100);
  background: #f3f4f6;
}

.upload-area i {
  font-size: 48px;
  color: #6b7280;
  margin-bottom: 12px;
  display: block;
}

.upload-area p {
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
  margin: 0;
}

.upload-preview {
  margin-top: 16px;
}

.upload-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.upload-preview-header span {
  font-size: 14px;
  font-weight: 700;
  color: var(--pt100);
}

.btn-clear-upload {
  background: #f3f4f6;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-clear-upload:hover {
  background: #e5e7eb;
}

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.upload-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
}

.upload-thumb img,
.upload-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-thumb-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.6);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  pointer-events: none;
}

.btn-remove-upload {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(220, 53, 69, 0.9);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
  z-index: 10;
}

.btn-remove-upload:hover {
  background: #dc3545;
  transform: scale(1.1);
}

.upload-thumb-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  font-size: 10px;
  padding: 8px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* ==================== PREVIEW MÍDIA ==================== */

.modal-preview-content {
  background: rgba(0, 0, 0, 0.95);
  width: 95vw;
  height: 95vh;
  max-width: none;
  max-height: none;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.preview-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.preview-media-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.preview-media-container img,
.preview-media-container video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  object-fit: contain;
}

/* ==================== PROGRESS CONTAINER ==================== */

.progress-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 320px;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  pointer-events: none;
}

.progress-container.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

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

.progress-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--pt100);
  margin: 0;
}

.progress-percentage {
  font-size: 14px;
  font-weight: 700;
  color: var(--pt100);
}

.progress-bar-container {
  height: 8px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pt100), var(--pt75));
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-files {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  .designer-container {
    padding: 12px;
  }

  .designer-tabs {
    padding: 8px;
    gap: 8px;
  }

  .tab-btn {
    min-width: 120px;
    padding: 12px 16px;
    font-size: 13px;
  }

  .tab-btn span:not(.tab-badge) {
    display: none;
  }

  .requests-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .approved-filters {
    flex-direction: column;
    padding: 12px;
  }

  .modal-large {
    width: 95%;
    max-height: 95vh;
  }

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

  .medias-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .message {
    max-width: 85%;
  }

  .upload-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .progress-container {
    bottom: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
  }

  .modal-preview-content {
    width: 100vw;
    height: 100vh;
    padding: 10px;
  }

  .preview-close {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .request-card-header {
    flex-wrap: wrap;
  }

  .request-status {
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }

  .request-meta {
    flex-direction: column;
    gap: 8px;
  }

  .upload-area {
    padding: 30px 15px;
  }

  .upload-area i {
    font-size: 40px;
  }

  .client-details {
    flex-direction: column;
    text-align: center;
  }

  .details-actions {
    flex-direction: column;
  }
}

/* ==================== SCROLLBAR CUSTOMIZADO ==================== */

.modal-large::-webkit-scrollbar {
  width: 8px;
}

.modal-large::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-large::-webkit-scrollbar-thumb {
  background: var(--pt100);
  border-radius: 10px;
}

.modal-large::-webkit-scrollbar-thumb:hover {
  background: var(--pt75);
}
