# CSS completo - Design Mobile-First com tema moderno css_content = '''/* ============================================ GLACIMAR APP - Mobile CSS Tema: Modern Blue Gradient ============================================ */ :root { /* Cores Principais */ --primary: #2563eb; --primary-dark: #1d4ed8; --primary-light: #3b82f6; --secondary: #7c3aed; --accent: #f59e0b; /* Cores de Feedback */ --success: #10b981; --warning: #f59e0b; --danger: #ef4444; --info: #3b82f6; /* Cores Neutras */ --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827; /* Sombras */ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* Bordas */ --radius-sm: 6px; --radius: 12px; --radius-lg: 16px; --radius-xl: 24px; --radius-full: 9999px; /* Espaçamento */ --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); --header-height: 120px; --nav-height: 70px; /* Animações */ --transition-fast: 150ms ease; --transition: 300ms ease; --transition-slow: 500ms ease; } /* Reset e Base */ * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; } html { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overscroll-behavior-y: none; } body { background: var(--gray-50); color: var(--gray-900); overflow-x: hidden; position: fixed; width: 100%; height: 100%; } #app { width: 100%; height: 100%; display: flex; flex-direction: column; position: relative; background: linear-gradient(180deg, #ffffff 0%, var(--gray-50) 100%); } /* ============================================ HEADER ============================================ */ .app-header { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); padding: var(--safe-top) 16px 16px; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-lg); } .header-content { display: flex; align-items: center; justify-content: space-between; height: 56px; } .btn-menu, .btn-notifications { width: 40px; height: 40px; border: none; background: rgba(255, 255, 255, 0.2); border-radius: var(--radius); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition-fast); backdrop-filter: blur(10px); } .btn-menu:active, .btn-notifications:active { transform: scale(0.95); background: rgba(255, 255, 255, 0.3); } .logo { font-size: 1.5rem; font-weight: 700; color: white; letter-spacing: -0.5px; text-shadow: 0 2px 4px rgba(0,0,0,0.1); } .btn-notifications { position: relative; } .badge { position: absolute; top: -2px; right: -2px; background: var(--danger); color: white; font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; border: 2px solid var(--primary); animation: pulse 2s infinite; } @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } } /* Search Box */ .search-container { margin-top: 12px; } .search-box { display: flex; align-items: center; background: white; border-radius: var(--radius-xl); padding: 4px; box-shadow: var(--shadow-md); transition: var(--transition); } .search-box:focus-within { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3); } .search-icon { color: var(--gray-400); margin-left: 12px; flex-shrink: 0; } #searchInput { flex: 1; border: none; background: none; padding: 12px; font-size: 0.95rem; color: var(--gray-800); outline: none; } #searchInput::placeholder { color: var(--gray-400); } .btn-filter { width: 40px; height: 40px; border: none; background: var(--gray-100); border-radius: var(--radius-full); color: var(--gray-600); display: flex; align-items: center; justify-content: center; cursor: pointer; margin-right: 4px; transition: var(--transition-fast); } .btn-filter:active { background: var(--gray-200); transform: scale(0.95); } /* ============================================ MAIN CONTENT ============================================ */ .main-content { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 20px); scroll-behavior: smooth; } .main-content::-webkit-scrollbar { display: none; } /* Skeleton Loading */ .skeleton-container { padding: 20px 16px; } .skeleton-header { height: 32px; width: 60%; background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius); margin-bottom: 20px; } .skeleton-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .skeleton-card { height: 200px; background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-lg); } @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } .content-hidden { display: none; } /* ============================================ SECTIONS ============================================ */ .section { margin-bottom: 24px; padding: 0 16px; } .section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; } .section-header h2 { font-size: 1.25rem; font-weight: 700; color: var(--gray-800); } .btn-see-all { background: none; border: none; color: var(--primary); font-size: 0.875rem; font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: var(--radius); transition: var(--transition-fast); } .btn-see-all:active { background: var(--primary-light); color: white; } .tag { background: linear-gradient(135deg, var(--accent) 0%, #f97316 100%); color: white; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.5px; } /* ============================================ CATEGORIAS ============================================ */ .categories-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .categories-scroll::-webkit-scrollbar { display: none; } .category-item { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 16px; background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 2px solid transparent; cursor: pointer; transition: var(--transition-fast); min-width: 80px; } .category-item:active { transform: scale(0.95); } .category-item.active { border-color: var(--primary); background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%); } .category-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; } .category-item span { font-size: 0.75rem; font-weight: 600; color: var(--gray-700); white-space: nowrap; } /* ============================================ CARDS DE PARCEIROS ============================================ */ .highlights-scroll { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 16px; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; } .highlights-scroll::-webkit-scrollbar { display: none; } .partner-card { flex-shrink: 0; width: 280px; background: white; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); scroll-snap-align: start; position: relative; transition: var(--transition); } .partner-card:active { transform: scale(0.98); } .card-image { width: 100%; height: 160px; object-fit: cover; background: var(--gray-200); } .discount-badge { position: absolute; top: 12px; right: 12px; background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%); color: white; font-weight: 800; font-size: 0.875rem; padding: 6px 12px; border-radius: var(--radius-full); box-shadow: var(--shadow-md); z-index: 2; } .favorite-btn { position: absolute; top: 12px; left: 12px; width: 36px; height: 36px; border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.9); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition-fast); z-index: 2; } .favorite-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--gray-400); stroke-width: 2; transition: var(--transition-fast); } .favorite-btn.active svg { fill: var(--danger); stroke: var(--danger); } .card-content { padding: 16px; } .card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .partner-logo { width: 48px; height: 48px; border-radius: var(--radius); object-fit: cover; border: 2px solid var(--gray-100); } .partner-info h3 { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 2px; } .partner-info .category { font-size: 0.75rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; } .card-description { font-size: 0.875rem; color: var(--gray-600); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .card-footer { display: flex; gap: 8px; } .btn-card { flex: 1; padding: 10px; border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: var(--transition-fast); display: flex; align-items: center; justify-content: center; gap: 6px; border: none; } .btn-card-primary { background: var(--primary); color: white; } .btn-card-primary:active { background: var(--primary-dark); } .btn-card-secondary { background: var(--gray-100); color: var(--gray-700); } .btn-card-secondary:active { background: var(--gray-200); } /* Grid de Parceiros */ .partners-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .partner-card-compact { background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); position: relative; } .partner-card-compact .card-image { height: 120px; } .partner-card-compact .card-content { padding: 12px; } .partner-card-compact h3 { font-size: 0.875rem; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .partner-card-compact .discount-tag { display: inline-block; background: linear-gradient(135deg, var(--success) 0%, #059669 100%); color: white; font-size: 0.75rem; font-weight: 700; padding: 4px 8px; border-radius: var(--radius-sm); margin-bottom: 8px; } .partner-card-compact .distance { font-size: 0.75rem; color: var(--gray-500); display: flex; align-items: center; gap: 4px; } /* ============================================ BOTTOM NAVIGATION ============================================ */ .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: white; display: flex; justify-content: space-around; align-items: center; height: calc(var(--nav-height) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08); z-index: 1000; border-top: 1px solid var(--gray-100); } .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; background: none; border: none; color: var(--gray-400); font-size: 0.7rem; font-weight: 500; cursor: pointer; transition: var(--transition-fast); position: relative; } .nav-item svg { transition: var(--transition-fast); } .nav-item.active { color: var(--primary); } .nav-item.active svg { stroke-width: 2.5; transform: translateY(-2px); } .nav-item-center { position: relative; top: -20px; } .qr-circle { width: 60px; height: 60px; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: white; box-shadow: var(--shadow-lg); border: 4px solid white; transition: var(--transition-fast); } .nav-item-center:active .qr-circle { transform: scale(0.95); } .nav-badge { position: absolute; top: 4px; right: 20%; background: var(--danger); color: white; font-size: 0.6rem; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; } /* ============================================ MODAIS ============================================ */ .modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); z-index: 2000; display: none; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity var(--transition); } .modal.active { display: flex; opacity: 1; } .modal-content { background: white; width: 100%; max-height: 85vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; overflow: hidden; display: flex; flex-direction: column; transform: translateY(100%); transition: transform var(--transition); } .modal.active .modal-content { transform: translateY(0); } .modal-full .modal-content { max-height: 100vh; border-radius: 0; } .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--gray-100); } .modal-header h3 { font-size: 1.125rem; font-weight: 700; } .btn-close { width: 32px; height: 32px; border: none; background: var(--gray-100); border-radius: var(--radius-full); font-size: 1.5rem; color: var(--gray-600); cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; } .modal-body { flex: 1; overflow-y: auto; padding: 20px; } .modal-footer { display: flex; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--gray-100); background: var(--gray-50); } /* Filtros */ .filter-group { margin-bottom: 24px; } .filter-group label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--gray-700); margin-bottom: 12px; } .filter-options { display: flex; flex-wrap: wrap; gap: 8px; } .filter-chip { padding: 8px 16px; border: 2px solid var(--gray-200); background: white; border-radius: var(--radius-full); font-size: 0.875rem; color: var(--gray-600); cursor: pointer; transition: var(--transition-fast); } .filter-chip.active { border-color: var(--primary); background: rgba(37, 99, 235, 0.1); color: var(--primary); font-weight: 600; } input[type="range"] { width: 100%; height: 6px; border-radius: var(--radius-full); background: var(--gray-200); outline: none; -webkit-appearance: none; } input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: var(--radius-full); background: var(--primary); cursor: pointer; box-shadow: var(--shadow); } select { width: 100%; padding: 12px; border: 2px solid var(--gray-200); border-radius: var(--radius); font-size: 0.875rem; background: white; color: var(--gray-700); } /* QR Scanner */ .qr-container { position: relative; background: black; padding: 0; display: flex; align-items: center; justify-content: center; } #qrVideo { width: 100%; height: 100%; object-fit: cover; } .qr-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.3); } .qr-frame { width: 250px; height: 250px; border: 3px solid white; border-radius: var(--radius-lg); position: relative; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5); } .qr-frame::before, .qr-frame::after { content: ''; position: absolute; width: 20px; height: 20px; border-color: var(--primary); border-style: solid; border-width: 0; } .qr-frame::before { top: -3px; left: -3px; border-top-width: 4px; border-left-width: 4px; } .qr-frame::after { bottom: -3px; right: -3px; border-bottom-width: 4px; border-right-width: 4px; } .qr-overlay p { color: white; margin-top: 24px; font-size: 0.875rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); } /* ============================================ BOTÕES ============================================ */ .btn-primary { flex: 1; padding: 14px 24px; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; border: none; border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: var(--transition-fast); box-shadow: var(--shadow-md); } .btn-primary:active { transform: translateY(1px); box-shadow: var(--shadow-sm); } .btn-secondary { flex: 1; padding: 14px 24px; background: white; color: var(--gray-700); border: 2px solid var(--gray-200); border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: var(--transition-fast); } .btn-secondary:active { background: var(--gray-50); } .btn-load-more { width: 100%; padding: 16px; background: white; border: 2px dashed var(--gray-300); border-radius: var(--radius); color: var(--gray-600); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: var(--transition-fast); } .btn-load-more:active { border-color: var(--primary); color: var(--primary); } /* ============================================ TOAST NOTIFICATIONS ============================================ */ .toast-container { position: fixed; top: calc(var(--safe-top) + 80px); left: 16px; right: 16px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; } .toast { background: white; padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow-xl); display: flex; align-items: center; gap: 12px; animation: slideDown var(--transition); pointer-events: auto; } .toast.success { border-left: 4px solid var(--success); } .toast.error { border-left: 4px solid var(--danger); } .toast.warning { border-left: 4px solid var(--warning); } .toast-icon { width: 24px; height: 24px; flex-shrink: 0; } .toast-content { flex: 1; } .toast-title { font-weight: 600; font-size: 0.875rem; color: var(--gray-800); margin-bottom: 2px; } .toast-message { font-size: 0.8125rem; color: var(--gray-600); } @keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } /* ============================================ INSTALL PROMPT ============================================ */ .install-prompt { position: fixed; bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px); left: 16px; right: 16px; background: white; border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-xl); z-index: 1500; animation: slideUp var(--transition); } @keyframes slideUp { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } } .install-content { display: flex; align-items: center; gap: 12px; } .install-content img { width: 48px; height: 48px; border-radius: var(--radius); } .install-text { flex: 1; } .install-text strong { display: block; font-size: 0.9375rem; color: var(--gray-800); margin-bottom: 2px; } .install-text p { font-size: 0.8125rem; color: var(--gray-500); } .btn-install { padding: 10px 20px; background: var(--primary); color: white; border: none; border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; cursor: pointer; white-space: nowrap; } .btn-dismiss { width: 32px; height: 32px; border: none; background: none; color: var(--gray-400); font-size: 1.25rem; cursor: pointer; display: flex; align-items: center; justify-content: center; } /* ============================================ UTILITÁRIOS ============================================ */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .hidden { display: none !important; } /* Pull to refresh indicator */ .ptr-indicator { text-align: center; padding: 20px; color: var(--gray-400); font-size: 0.875rem; display: none; } .ptr-indicator.visible { display: block; } .ptr-indicator svg { animation: rotate 1s linear infinite; } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* Empty state */ .empty-state { text-align: center; padding: 40px 20px; color: var(--gray-500); } .empty-state svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.5; } .empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; } .empty-state p { font-size: 0.875rem; } ''' with open(f"{base_path}/assets/css/app.css", "w", encoding="utf-8") as f: f.write(css_content) print("✅ app.css criado (", len(css_content), " caracteres)")