/* CSS Desktop para Status dos Pedidos */
/* Este arquivo será usado para dispositivos desktop e tablet */

/* Variáveis CSS - UNIFICADAS COM DESKINDEX.CSS */
:root {
  --primary: #8e44ad; /* Roxo principal - unificado */
  --secondary: #2C3E50;
  --background: #F8F9FA;
  --card-bg: #FFFFFF;
  --text: #2C3E50;
  --text-muted: #6C757D;
  --border: #DEE2E6;
  --success: #27ae60;
  --warning: #e67e22;
  --danger: #e74c3c;
  --info: #17A2B8;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --spacing: 1rem;
  --fidelity: #9b59b6;
  
  /* Tema escuro */
  --dark-bg: #1a1a1a;
  --dark-card: #2d2d2d;
  --dark-text: #ffffff;
  --dark-text-muted: #b0b0b0;
  --dark-border: #404040;

  /* Alias para compatibilidade */
  --primary-color: var(--primary);
  --secondary-color: var(--secondary);
  --success-color: var(--success);
  --warning-color: var(--warning);
  --danger-color: var(--danger);
  --light-color: var(--background);
  --dark-color: var(--text);
  --gray-color: var(--text-muted);
  --border-radius: var(--radius);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background);
  color: var(--text);
  padding: 20px;
  padding-bottom: 100px;
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Tema escuro */
[data-theme="dark"] {
  --background: var(--dark-bg);
  --card-bg: var(--dark-card);
  --text: var(--dark-text);
  --text-muted: var(--dark-text-muted);
  --border: var(--dark-border);
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  margin: 20px 0 30px;
  position: relative;
}

.page-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--text);
  margin: 0;
  padding-bottom: 10px;
  position: relative;
  display: inline-block;
}

.page-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--primary);
  border-radius: 2px;
}

.no-orders {
  text-align: center;
  padding: 40px 20px;
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 20px auto;
  max-width: 500px;
  border: 2px solid var(--border);
}

.no-orders i {
  font-size: 60px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.no-orders p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.no-orders .btn {
  padding: 12px 24px;
  background-color: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: bold;
  display: inline-block;
  transition: all 0.3s ease;
}

.no-orders .btn:hover {
  background-color: #6c3483;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(142, 68, 173, 0.3);
}

.login-required {
  text-align: center;
  padding: 40px 20px;
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 20px auto;
  max-width: 500px;
  border: 2px solid var(--border);
}

.login-required i {
  font-size: 60px;
  color: var(--warning);
  margin-bottom: 20px;
}

.login-required h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text);
}

.login-required p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 25px;
}

/* MELHORADO: Estilos para o botão de login */
.login-btn {
  display: inline-block;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--primary) 0%, #6c3483 100%);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 8px 25px rgba(142, 68, 173, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  animation: loginPulse 3s ease-in-out infinite;
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s ease;
}

.login-btn:hover::before {
  left: 100%;
}

@keyframes loginPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(142, 68, 173, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(142, 68, 173, 0.6);
  }
}

.login-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(142, 68, 173, 0.6);
  animation: none;
}

.login-btn i {
  margin-right: 10px;
  font-size: 18px;
}

.pedido-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 25px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.5s ease-out;
  border: 2px solid var(--border);
}

.pedido-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(142, 68, 173, 0.15);
  border-color: var(--primary);
}

.pedido-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: var(--background);
  border-bottom: 2px solid var(--border);
}

.pedido-id {
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
}

.pedido-data {
  color: var(--text-muted);
  font-size: 14px;
}

.pedido-body {
  padding: 20px;
}

.status-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 15px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 15px;
  flex: 1;
  max-width: 200px;
  justify-content: center;
}

.status-badge i {
  margin-right: 8px;
}

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

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

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

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

.btn-falar-loja {
  background-color: #25D366;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-falar-loja:hover {
  background-color: #128C7E;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.btn-falar-loja i {
  font-size: 14px;
}

.pedido-info {
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  margin-bottom: 10px;
}

.info-label {
  flex: 0 0 120px;
  font-weight: bold;
  color: var(--text-muted);
}

.info-value {
  flex: 1;
  color: var(--text);
}

.endereco-box {
  background-color: var(--background);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid var(--primary);
}

.itens-section {
  margin-top: 20px;
}

.itens-title {
  font-size: 16px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  color: var(--text);
}

.itens-title i {
  margin-right: 10px;
  color: var(--primary);
}

.item-card {
  padding: 12px 15px;
  background-color: var(--background);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}

.item-card:hover {
  background-color: rgba(142, 68, 173, 0.05);
  transform: translateX(2px);
  border-color: var(--primary);
}

.item-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-quantity {
  background-color: var(--primary);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.item-name {
  font-weight: 600;
}

.item-price {
  font-weight: bold;
  color: var(--text);
  margin-left: auto;
}

.item-observacao {
  margin-top: 8px;
  font-size: 14px;
  color: #666;
  font-style: italic;
  background-color: #f9f9f9;
  padding: 8px;
  border-radius: 5px;
  border-left: 3px solid var(--primary);
}

/* MELHORADOS: Estilos para sabores de pizza */
.pizza-sabores {
  margin: 8px 0 12px;
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  border: 1px solid var(--fidelity);
  border-radius: 6px;
  padding: 10px;
}

.pizza-tipo-titulo {
  font-weight: 600;
  color: var(--fidelity);
  margin-bottom: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pizza-tipo-titulo i {
  color: var(--primary);
}

.sabor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  color: #4a148c;
  font-weight: 500;
}

.sabor-nome {
  flex: 1;
}

.sabor-preco {
  font-weight: 600;
  color: var(--fidelity);
}

/* MELHORADOS: Estilos para complementos */
.pizza-complementos {
  margin: 8px 0 12px;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border: 1px solid var(--info);
  border-radius: 6px;
  padding: 10px;
}

.complementos-tipo-titulo {
  font-weight: 600;
  color: #0d47a1;
  margin-bottom: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.complementos-tipo-titulo i {
  color: var(--info);
}

.complemento-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  color: #1565c0;
  font-weight: 500;
}

.complemento-nome {
  flex: 1;
}

.complemento-preco {
  font-weight: 600;
  color: #1976d2;
}

.complemento-preco.free {
  color: #1976d2;
}

.adicional-item {
  padding: 8px 15px 8px 38px;
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--background);
  border-radius: 4px;
  margin: 5px 0;
  border-left: 2px solid var(--primary);
}

.adicional-item:last-child {
  margin-bottom: 10px;
}

.pagamento-info {
  margin-top: 20px;
  background-color: var(--background);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--success);
}

.troco-info {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.total-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.total-row.subtotal {
  color: var(--text-muted);
}

.total-row.delivery {
  color: var(--warning);
}

.total-row.grand-total {
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
  color: var(--text);
}

/* Menu inferior */
.menu-inferior {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border-top: 2px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
  z-index: 1001;
}

.menu-inferior a {
  text-align: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  padding: 0 12px;
  transition: color 0.2s ease;
  position: relative;
  max-width: 200px;
}

.menu-inferior a i {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.menu-inferior a:hover i {
  transform: translateY(-2px);
}

.menu-inferior a.active {
  color: var(--primary);
}

.menu-inferior a.active i {
  color: var(--primary);
}

.notificacao-carrinho {
  position: absolute;
  top: -5px;
  right: 50%;
  background: var(--danger);
  color: #ffffff;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transform: translateX(50%);
}

.timeline {
  margin-top: 20px;
  margin-bottom: 30px;
  padding: 0 10px;
}

.timeline-track {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 30px;
}

.timeline-track:before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--border);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 80px;
}

.step-icon {
  width: 34px;
  height: 34px;
  background-color: var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin: 0 auto 10px;
  border: 3px solid var(--card-bg);
  transition: all 0.3s ease;
}

.step-icon i {
  font-size: 16px;
}

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

.timeline-step.active .step-icon {
  color: white;
  transform: scale(1.1);
}

.timeline-step.active .step-text {
  color: var(--text);
  font-weight: 600;
}

.timeline-step.completed .step-icon {
  color: white;
}

/* Cores específicas para cada etapa da timeline */
.timeline-step:nth-child(1).active .step-icon,
.timeline-step:nth-child(1).completed .step-icon {
  background-color: var(--success);
}

.timeline-step:nth-child(2).active .step-icon,
.timeline-step:nth-child(2).completed .step-icon {
  background-color: var(--warning);
}

.timeline-step:nth-child(3).active .step-icon,
.timeline-step:nth-child(3).completed .step-icon {
  background-color: var(--success);
}

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

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse {
  animation: pulse 2s infinite;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
}

.empty-state i {
  font-size: 60px;
  color: #d1d9e6;
  margin-bottom: 20px;
}

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

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 25px;
  font-size: 16px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background-color: #6c3483;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(142, 68, 173, 0.1);
}

.status-update {
  animation: highlight 2s;
}

@keyframes highlight {
  0% { background-color: rgba(142, 68, 173, 0.2); }
  100% { background-color: transparent; }
}

/* MELHORADOS: Estilos para os modais de login/cadastro */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease-out;
}

.modal-container {
  background-color: var(--card-bg);
  width: 90%;
  max-width: 500px;
  margin: 50px auto;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalSlideIn 0.3s ease-out;
  border: 2px solid var(--border);
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
  background: var(--primary);
  color: white;
  padding: 2rem;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -20px -20px 20px -20px;
}

.modal-title {
  margin: 0;
  color: white;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.modal-body {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  font-size: 14px;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  background: var(--card-bg);
  color: var(--text);
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.2);
}

.btn-submit {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  background-color: #6c3483;
  transform: translateY(-2px);
}

.btn-cancel {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background-color: var(--danger);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn-cancel:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

.alert {
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 14px;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 2px solid #c3e6cb;
}

/* Tema escuro para alertas */
[data-theme="dark"] .alert-danger {
  background-color: #2d1b1e;
  color: #f8d7da;
  border-color: #721c24;
}

[data-theme="dark"] .alert-success {
  background-color: #1c2d20;
  color: #d4edda;
  border-color: #155724;
}

.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

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

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .info-row {
    flex-direction: column;
    margin-bottom: 15px;
  }
  
  .info-label {
    flex: 0 0 auto;
    margin-bottom: 5px;
  }
  
  .timeline-track {
    margin-left: -15px;
    margin-right: -15px;
  }
  
  .timeline-step {
    width: 60px;
  }
  
  .step-text {
    font-size: 10px;
  }
  
  .pedido-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .pedido-data {
    margin-top: 5px;
  }
  
  .status-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }
  
  .status-badge {
    font-size: 13px;
    padding: 8px 16px;
    flex: 1;
    max-width: 180px;
  }
  
  .btn-falar-loja {
    font-size: 11px;
    padding: 6px 10px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .form-row {
    flex-direction: column;
    gap: 15px;
  }
}

/* Acordeão para pedidos */
.pedido-toggle {
  cursor: pointer;
}

.pedido-body {
  display: none;
}

.pedido-card.expanded .pedido-body {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.toggle-icon {
  transition: transform 0.3s ease;
  margin-left: 10px;
}

.pedido-card.expanded .toggle-icon {
  transform: rotate(180deg);
}

.refresh-indicator {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(142, 68, 173, 0.2);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  animation: spin 1.5s linear infinite;
  display: none;
}

.refresh-indicator.active {
  display: flex;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.item-complementos {
    margin: 8px 0 12px;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c8);
    border: 1px solid #4caf50;
    border-radius: 6px;
    padding: 10px;
}

.complementos-titulo {
    font-weight: 600;
    color: #2e7d2e;
    margin-bottom: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.complemento-item-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    color: #1b5e20;
    font-weight: 500;
}

.complemento-nome {
    flex: 1;
}

.complemento-preco {
    font-weight: 600;
    color: #2e7d2e;
}

.complemento-preco.free {
    color: #4caf50;
}
