/* SnapFotos - Estilos CORRIGIDOS - Menu apenas para Dashboard */

:root {
    --primary-color: #6366f1;
    --secondary-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #374151;
}

/* ========== MENU APENAS PARA PÁGINAS COM SIDEBAR ========== */

/* Menu Toggle Button - APENAS se .sidebar existir */
.menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1100;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    width: 45px;
    height: 45px;
    display: none; /* Escondido por padrão */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Só mostrar se existir .sidebar na página */
body:has(.sidebar) .menu-toggle {
    display: flex;
}

.menu-toggle:hover {
    background: #4f46e5;
    transform: scale(1.05);
}

/* Hamburger Animation */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 15px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: white;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger Active State */
.menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1080;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px; /* Fora da tela inicialmente */
    width: 280px;
    height: 100vh;
    background: white !important;
    border-right: 1px solid #e5e7eb;
    color: #374151 !important;
    z-index: 1090;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    padding-top: 80px;
    transition: left 0.3s ease;
}

/* SIDEBAR visível */
.sidebar.show {
    left: 0;
}

/* ========== NAVBAR AJUSTADA APENAS PARA PÁGINAS COM SIDEBAR ========== */
/* Navbar normal para páginas sem sidebar */
.navbar {
    backdrop-filter: blur(10px);
    background: #6366f1 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1070;
}

/* Ajustes apenas para páginas com sidebar */
body:has(.sidebar) .navbar {
    padding-left: 80px !important;
}

.navbar-brand {
    color: white !important;
}

.navbar-nav .nav-link {
    color: white !important;
}

/* ========== MAIN CONTENT APENAS PARA PÁGINAS COM SIDEBAR ========== */
.main-content {
    transition: margin-left 0.3s ease;
    margin-left: 0;
}

/* PREVENIR scroll quando menu aberto no mobile */
body.sidebar-open {
    overflow: hidden;
}

/* ========== DESKTOP ESPECÍFICO ========== */
@media (min-width: 769px) {
    /* SIDEBAR fechada por padrão no desktop */
    .sidebar {
        left: -300px; /* Mantém fora da tela */
    }
    
    /* QUANDO sidebar aberta no desktop */
    .sidebar.show {
        left: 0;
    }
    
    /* MAIN CONTENT se ajusta quando sidebar aberta */
    body:has(.sidebar.show) .main-content {
        margin-left: 280px;
    }
    
    /* NAVBAR se ajusta quando sidebar aberta */
    body:has(.sidebar.show) .navbar {
        margin-left: 280px;
    }
    
    /* OVERLAY não aparece no desktop */
    .sidebar-overlay {
        display: none !important;
    }
    
    /* Permitir scroll no desktop */
    body.sidebar-open {
        overflow: auto;
    }
}

/* ========== MOBILE ESPECÍFICO ========== */
@media (max-width: 768px) {
    /* MAIN CONTENT sempre sem margem no mobile */
    .main-content {
        margin-left: 0 !important;
    }
}

/* ========== SIDEBAR NAVIGATION ========== */
.sidebar-nav {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sidebar-nav ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sidebar-nav li {
    margin-bottom: 2px;
    list-style: none !important;
    padding: 0 !important;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #6b7280 !important;
    text-decoration: none;
    border-radius: 0 25px 25px 0;
    margin-right: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    background: transparent !important;
}

.sidebar-nav a:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

.sidebar-nav a.active {
    background: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sidebar-nav a.active::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--primary-color);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.sidebar-nav i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
    color: inherit;
}

/* ========== RESTO DOS ESTILOS ========== */

/* Hero Section */
.hero-section {
    background: var(--gradient-bg);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.floating-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Seções */
section {
    padding: 5rem 0;
}

/* Como Funciona */
.step-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: var(--gradient-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--secondary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

/* Pricing Cards */
.pricing-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

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

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.price {
    margin: 1rem 0;
}

.currency {
    font-size: 1.2rem;
    vertical-align: top;
}

.amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.period {
    color: #6b7280;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: #6b7280;
}

.pricing-features li i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Formulários */
.form-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    transform: translateY(-2px);
}

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

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-2px);
}

/* Cards do Dashboard */
.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* QR Code Display */
.qr-display {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px dashed #d1d5db;
}

.qr-code-container {
    display: inline-block;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Upload Area */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 1rem;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-1px);
}

.upload-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* GALERIA DE FOTOS - THUMBNAILS PEQUENOS */
.photo-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    margin: 16px 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

.photo-thumbnail {
    position: relative !important;
    width: 100% !important;
    max-width: 80px !important;
    height: 80px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    cursor: pointer !important;
    background: #f5f5f5 !important;
}

.photo-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    border-radius: 8px !important;
}

.photo-info {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(0,0,0,0.7) !important;
    padding: 4px !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.photo-thumbnail:hover .photo-info {
    opacity: 1 !important;
}

.photo-info small {
    color: white !important;
    font-size: 10px !important;
    text-align: center !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Responsive Galeria */
@media (min-width: 480px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 10px !important;
    }
    
    .photo-thumbnail {
        max-width: 90px !important;
        height: 90px !important;
    }
    
    .photo-thumbnail img {
        width: 90px !important;
        height: 90px !important;
        max-width: 90px !important;
        max-height: 90px !important;
    }
}

@media (min-width: 768px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 12px !important;
    }
    
    .photo-thumbnail {
        max-width: 100px !important;
        height: 100px !important;
    }
    
    .photo-thumbnail img {
        width: 100px !important;
        height: 100px !important;
        max-width: 100px !important;
        max-height: 100px !important;
    }
    
    .photo-info small {
        font-size: 11px !important;
    }
}

@media (min-width: 992px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 15px !important;
    }
    
    .photo-thumbnail {
        max-width: 120px !important;
        height: 120px !important;
    }
    
    .photo-thumbnail img {
        width: 120px !important;
        height: 120px !important;
        max-width: 120px !important;
        max-height: 120px !important;
    }
    
    .photo-info small {
        font-size: 12px !important;
    }
}

/* Sobrescrever estilos antigos da galeria */
.photo-grid {
    display: none !important;
}

.photo-item {
    display: none !important;
}

/* Tabelas */
.table-custom {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-custom thead {
    background: var(--primary-color);
    color: white;
}

.table-custom th,
.table-custom td {
    padding: 1rem;
    border: none;
}

.table-custom tbody tr {
    border-bottom: 1px solid #f3f4f6;
}

.table-custom tbody tr:hover {
    background: #f9fafb;
}

/* Alertas Customizados */
.alert-custom {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

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

/* Responsividade Geral */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .floating-card {
        margin-top: 2rem;
    }
    
    .pricing-card.featured {
        transform: none;
        margin-top: 2rem;
    }
    
    .step-icon {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }
    
    section {
        padding: 3rem 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .pricing-card,
    .feature-card,
    .form-container {
        margin-bottom: 1rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

.pulse {
    animation: pulse 2s infinite;
}

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

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

/* Scroll customizado para sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Utilities */
.bg-gradient {
    background: var(--gradient-bg);
}

.text-gradient {
    background: var(--gradient-bg);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow);
}

.shadow-lg-custom {
    box-shadow: var(--shadow-lg);
}