/* Estilos principais do Snipe */
:root {
  --primary-color: #7c3aed;
  --primary-hover: #6d28d9;
  --secondary-color: #f3f4f6;
  --text-color: #333;
  --light-text: #6b7280;
  --white: #ffffff;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --border-color: #e5e7eb;
  --sidebar-width: 250px;
  --header-height: 60px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background-color: #f9fafb;
  min-height: 100vh;
}

/* Layout principal */
.layout-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--white);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  height: 40px;
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background-color: rgba(124, 58, 237, 0.05);
}

.nav-item.active {
  background-color: rgba(124, 58, 237, 0.1);
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
  font-weight: 500;
}

.nav-icon {
  margin-right: 0.75rem;
  width: 20px; /* Mantém a largura fixa */
  height: 20px; /* Mantém a altura fixa */
  object-fit: contain; /* Garante que a imagem caiba sem distorcer */
  vertical-align: middle; /* Alinha melhor com o texto */
}

/* Conteúdo principal */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  padding-top: calc(var(--header-height) + 1rem);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  height: var(--header-height);
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 50;
}

.user-dropdown {
  position: relative;
  cursor: pointer;
  display: flex; /* Added */
  align-items: center; /* Added */
  gap: 0.5rem; /* Added */
}

.user-dropdown-content {
  position: absolute;
  right: 0;
  top: 100%;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  min-width: 200px;
  z-index: 100;
  display: none;
}

.user-dropdown-content.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: var(--secondary-color);
}

/* Cards e Componentes */
.card {
  background-color: var(--white);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

/* Botões */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.375rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
}

.btn-primary {
  color: var(--white);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

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

.btn-secondary {
  color: var(--text-color);
  background-color: var(--secondary-color);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: #e5e7eb;
}

.btn-danger {
  color: var(--white);
  background-color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Formulários */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--white);
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  box-sizing: border-box; /* Added to ensure padding is included in width */
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

/* Alertas */
.alert {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
}

.alert-success {
  color: #0f766e;
  background-color: #d1fae5;
  border-color: #a7f3d0;
}

.alert-danger {
  color: #b91c1c;
  background-color: #fee2e2;
  border-color: #fecaca;
}

.alert-warning {
  color: #b45309;
  background-color: #fef3c7;
  border-color: #fde68a;
}

.alert-info {
  color: #1e40af;
  background-color: #dbeafe;
  border-color: #bfdbfe;
}

/* Tabelas */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--text-color);
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid var(--border-color);
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--border-color);
  text-align: left;
  font-weight: 600;
}

.table tbody + tbody {
  border-top: 2px solid var(--border-color);
}

/* Utilitários */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--primary-color);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}

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

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mb-5 {
  margin-bottom: 3rem;
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mt-5 {
  margin-top: 3rem;
}

/* Créditos */
.credit-card {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.credit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.credit-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 1rem 0;
}

.credit-price {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

/* Responsividade */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .header {
    left: 0;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
}

@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Ícone de crédito */
.credit-icon {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

/* Contador de créditos */
.credit-counter {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  color: var(--primary-color);
  font-weight: 500;
}

/* Estilos para a página de login/registro */
.auth-container {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background-color: #f9fafb;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--white);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 2rem;
}

.auth-logo {
  display: block;
  margin: 0 auto 2rem;
  height: 60px;
}

.auth-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--light-text);
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Estilos para Tutoriais */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* Ajusta colunas automaticamente */
    gap: 2rem;
    align-items: start; /* Alinha itens no topo */
}

.tutorial-item {
    display: flex;
    flex-direction: column; /* Empilha vídeo e texto */
    align-items: center; /* Centraliza na coluna */
    gap: 1rem;
}

.tutorial-video-container {
    position: relative;
    padding-bottom: 56.25%; /* Proporção 16:9 */
    height: 0;
    overflow: hidden;
    width: 100%; /* Ocupa a largura da coluna */
    max-width: 560px; /* Limita largura máxima do vídeo */
    background-color: #e5e7eb; /* Cor de fundo placeholder */
    border-radius: 0.5rem;
}

.tutorial-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.tutorial-text {
    text-align: left;
    width: 100%;
    max-width: 560px; /* Mesma largura do vídeo */
    padding-left: 1rem; /* Pequeno espaço à esquerda */
}

.tutorial-text h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Ajuste para alinhar vídeo e texto lado a lado em telas maiores - REMOVIDO PARA MANTER TEXTO ACIMA
@media (min-width: 992px) {
    .tutorial-item {
        flex-direction: row; /* Lado a lado */
        align-items: flex-start; /* Alinha no topo */
    }
    .tutorial-video-container {
        flex: 1; /* Ocupa espaço disponível */
        max-width: 45%; /* Limita largura do vídeo */
    }
    .tutorial-text {
        flex: 1; /* Ocupa espaço disponível */
        max-width: 50%; /* Limita largura do texto */
        padding-left: 1.5rem;
    }
}
*/

/* Ajustes para garantir que o texto fique sempre acima e centralizado */
.tutorial-item {
    display: flex;
    flex-direction: column; /* Sempre empilhado */
    align-items: center; /* Centraliza na coluna */
    gap: 1rem;
}

.tutorial-video-container {
    width: 100%; /* Ocupa a largura da coluna */
    max-width: 640px; /* Aumenta um pouco a largura máxima do vídeo */
    margin-bottom: 0.5rem; /* Espaço entre vídeo e texto */
}

.tutorial-text {
    text-align: center; /* Centraliza o texto */
    width: 100%;
    max-width: 640px; /* Mesma largura do vídeo */
    padding-left: 0; /* Remove padding desnecessário */
}


/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Botão de Suporte */
.support-btn {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.support-btn:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.support-btn i {
    font-size: 1rem;
}

/* Modal de Suporte */
.support-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.support-modal.show {
    opacity: 1;
    visibility: visible;
}

.support-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.support-modal.show .support-modal-content {
    transform: scale(1);
}

.support-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.support-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}

.support-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.support-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.support-modal-body {
    padding: 1.5rem;
}

.support-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    border: 2px solid #d1fae5;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.support-option:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.support-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.support-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.support-content p {
    margin: 0 0 1rem 0;
    color: #6b7280;
    line-height: 1.5;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e, #075e54);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    text-decoration: none;
    color: white;
}

.btn-whatsapp i {
    font-size: 1.1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .header-actions {
        gap: 0.5rem;
    }
    
    .support-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .support-btn span {
        display: none;
    }
    
    .support-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .support-option {
        flex-direction: column;
        text-align: center;
    }
    
    .support-icon {
        align-self: center;
    }
}


/* Termos de Uso e Política de Privacidade */
.terms-group {
    margin: 1.5rem 0;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.terms-label {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Botão desabilitado */
.btn-disabled,
.btn:disabled {
    background-color: #d1d5db !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.btn:disabled:hover {
    background-color: #d1d5db !important;
    border-color: #d1d5db !important;
    transform: none !important;
    box-shadow: none !important;
}


/* Seção de Assinatura */
.subscription-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.subscription-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.subscription-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.subscription-details {
    flex: 1;
}

.subscription-title {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.subscription-plan {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.subscription-price {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.subscription-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.subscription-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.subscription-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.next-billing {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Modal de Cancelamento */
.cancel-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cancel-modal.show {
    opacity: 1;
    visibility: visible;
}

.cancel-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cancel-modal.show .cancel-modal-content {
    transform: scale(1);
}

.cancel-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.cancel-modal-header h4 {
    margin: 0;
    color: #374151;
}

.cancel-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cancel-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.cancel-modal-body {
    padding: 1.5rem;
}

.cancel-warning {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.cancel-warning i {
    color: #dc2626;
    font-size: 1.5rem;
}

.cancel-warning p {
    margin: 0;
    color: #7f1d1d;
    font-weight: 500;
}

.cancel-info ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #6b7280;
}

.cancel-info li {
    margin-bottom: 0.5rem;
}

.cancel-modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .subscription-header {
        flex-direction: column;
        text-align: center;
    }
    
    .subscription-status {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .cancel-modal-footer {
        flex-direction: column;
    }
}

