Files
recreopay/public/css/styles.css
T

782 lines
14 KiB
CSS

/* ==========================================================================
RECREOPAY - SISTEMA DE DISEÑO ADAPTATIVO (KIDS 7-10 & TEENS 11-15 & SODA POS)
========================================================================== */
:root {
--primary: #0284c7;
--primary-hover: #0369a1;
--secondary: #10b981;
--accent: #f59e0b;
--danger: #ef4444;
--bg-main: #f8fafc;
--card-bg: #ffffff;
--text-main: #0f172a;
--text-muted: #64748b;
--border: #e2e8f0;
--radius: 16px;
--shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
}
/* Modo Teens (Estilo Fintech / Dark Mode) */
body.mode-teens {
--primary: #38bdf8;
--primary-hover: #0284c7;
--secondary: #34d399;
--accent: #fbbf24;
--bg-main: #0b1120;
--card-bg: #1e293b;
--text-main: #f1f5f9;
--text-muted: #94a3b8;
--border: #334155;
--radius: 12px;
--shadow: 0 10px 15px -3px rgb(0 0 0 / 0.4);
}
/* Modo Kids (Primaria: Lúdico, Grande, Amigable) */
body.mode-kids {
--primary: #0284c7;
--secondary: #10b981;
--accent: #f59e0b;
--bg-main: #eff6ff;
--card-bg: #ffffff;
--text-main: #1e293b;
--border: #bfdbfe;
--radius: 22px;
--shadow: 0 8px 20px -4px rgb(2 132 199 / 0.15);
font-size: 16px;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
-webkit-tap-highlight-color: transparent;
}
body {
background-color: var(--bg-main);
color: var(--text-main);
min-height: 100vh;
display: flex;
flex-direction: column;
transition: background-color 0.3s ease, color 0.3s ease;
}
/* Contenedor móvil centrado para PWA */
.app-container {
max-width: 480px;
margin: 0 auto;
width: 100%;
padding-bottom: 90px;
}
/* Top App Bar */
.top-bar {
background: var(--card-bg);
padding: 14px 18px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 40;
box-shadow: var(--shadow);
}
.brand-badge {
display: flex;
align-items: center;
gap: 8px;
font-size: 1.25rem;
font-weight: 800;
color: var(--text-main);
text-decoration: none;
}
.brand-badge .logo-icon {
background: linear-gradient(135deg, #0284c7, #38bdf8);
color: white;
width: 36px;
height: 36px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
}
/* Selector de Perfil y Modo */
.mode-toggle {
display: flex;
background: var(--bg-main);
border: 1px solid var(--border);
padding: 3px;
border-radius: 30px;
gap: 2px;
}
.mode-btn {
border: none;
background: transparent;
padding: 5px 12px;
border-radius: 20px;
font-size: 0.78rem;
font-weight: 700;
color: var(--text-muted);
cursor: pointer;
display: flex;
align-items: center;
gap: 4px;
transition: all 0.2s ease;
}
.mode-btn.active {
background: var(--primary);
color: #ffffff;
box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
/* Tarjeta de Saldo y Carné Digital */
.wallet-card {
margin: 16px;
background: linear-gradient(135deg, #0369a1, #0284c7);
color: white;
border-radius: var(--radius);
padding: 20px;
box-shadow: 0 12px 25px -4px rgba(2, 132, 199, 0.4);
position: relative;
overflow: hidden;
}
body.mode-teens .wallet-card {
background: linear-gradient(135deg, #1e293b, #0f172a);
border: 1px solid #334155;
box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.5);
}
body.mode-kids .wallet-card {
background: linear-gradient(135deg, #0284c7, #38bdf8);
border: 3px solid #7dd3fc;
}
.wallet-card::after {
content: "";
position: absolute;
top: -40px;
right: -40px;
width: 140px;
height: 140px;
background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
border-radius: 50%;
}
.student-info {
display: flex;
align-items: center;
gap: 14px;
margin-bottom: 16px;
}
.student-avatar {
width: 58px;
height: 58px;
border-radius: 50%;
border: 3px solid rgba(255, 255, 255, 0.8);
background: white;
object-fit: cover;
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.student-meta h2 {
font-size: 1.15rem;
font-weight: 800;
line-height: 1.2;
}
.student-grade {
font-size: 0.85rem;
opacity: 0.9;
display: inline-block;
margin-top: 2px;
}
.balance-row {
display: flex;
justify-content: space-between;
align-items: flex-end;
border-top: 1px solid rgba(255, 255, 255, 0.2);
padding-top: 14px;
}
.balance-col .label {
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.5px;
opacity: 0.85;
}
.balance-col .amount {
font-size: 1.85rem;
font-weight: 900;
letter-spacing: -0.5px;
display: flex;
align-items: center;
gap: 4px;
}
.kids-coin-icon {
font-size: 1.6rem;
animation: bounce 2s infinite ease-in-out;
}
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-4px); }
}
.qr-toggle-btn {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.4);
color: white;
padding: 8px 14px;
border-radius: 30px;
font-weight: 700;
font-size: 0.85rem;
cursor: pointer;
display: flex;
align-items: center;
gap: 6px;
backdrop-filter: blur(8px);
transition: all 0.2s;
}
.qr-toggle-btn:hover {
background: rgba(255, 255, 255, 0.35);
transform: scale(1.02);
}
/* Modal del Código QR Escolar */
.modal-qr-backdrop {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.8);
backdrop-filter: blur(6px);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
padding: 20px;
}
.modal-qr-card {
background: white;
border-radius: 24px;
padding: 26px 20px;
max-width: 340px;
width: 100%;
text-align: center;
box-shadow: 0 20px 40px rgba(0,0,0,0.3);
position: relative;
animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zoomIn {
from { transform: scale(0.9); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}
.qr-code-img {
width: 220px;
height: 220px;
margin: 14px auto;
display: block;
border-radius: 12px;
border: 2px dashed #0284c7;
padding: 6px;
}
/* Banner de Límite Diario / Alerta */
.daily-limit-badge {
background: var(--card-bg);
border: 1px solid var(--border);
margin: 0 16px 16px 16px;
padding: 10px 14px;
border-radius: var(--radius);
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.84rem;
}
.daily-limit-badge strong {
color: var(--secondary);
}
/* Navegación por Categorías */
.category-scroll {
display: flex;
overflow-x: auto;
gap: 8px;
padding: 4px 16px 12px 16px;
scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar {
display: none;
}
.cat-pill {
flex-shrink: 0;
background: var(--card-bg);
border: 1px solid var(--border);
color: var(--text-main);
padding: 8px 16px;
border-radius: 30px;
font-size: 0.86rem;
font-weight: 700;
cursor: pointer;
display: flex;
align-items: center;
gap: 6px;
box-shadow: var(--shadow);
transition: all 0.2s;
}
.cat-pill.active {
background: var(--primary);
color: white;
border-color: var(--primary);
}
/* Grilla de Productos */
.section-title {
padding: 0 16px;
margin-bottom: 10px;
font-size: 1.1rem;
font-weight: 800;
display: flex;
justify-content: space-between;
align-items: center;
}
.products-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
padding: 0 16px;
}
body.mode-kids .products-grid {
grid-template-columns: 1fr;
}
.product-card {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 14px;
box-shadow: var(--shadow);
display: flex;
flex-direction: column;
justify-content: space-between;
position: relative;
transition: transform 0.15s, box-shadow 0.15s;
}
.product-card:active {
transform: scale(0.98);
}
body.mode-kids .product-card {
flex-direction: row;
align-items: center;
gap: 16px;
padding: 16px;
}
.product-icon-wrap {
font-size: 2.8rem;
text-align: center;
margin-bottom: 8px;
}
body.mode-kids .product-icon-wrap {
font-size: 3.4rem;
margin-bottom: 0;
flex-shrink: 0;
}
.product-name {
font-size: 0.95rem;
font-weight: 800;
line-height: 1.25;
margin-bottom: 4px;
}
body.mode-kids .product-name {
font-size: 1.15rem;
}
.product-desc {
font-size: 0.76rem;
color: var(--text-muted);
line-height: 1.3;
margin-bottom: 8px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.badge-mep {
font-size: 0.68rem;
font-weight: 700;
background: #dcfce7;
color: #166534;
padding: 2px 6px;
border-radius: 4px;
display: inline-block;
margin-bottom: 6px;
}
.product-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 6px;
}
body.mode-kids .product-footer {
flex-direction: column;
align-items: flex-end;
gap: 8px;
}
.product-price {
font-size: 1.1rem;
font-weight: 900;
color: var(--primary);
}
.add-btn {
background: var(--primary);
color: white;
border: none;
width: 36px;
height: 36px;
border-radius: 50%;
font-size: 1.2rem;
font-weight: 900;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
transition: transform 0.15s;
}
body.mode-kids .add-btn {
width: 48px;
height: 48px;
font-size: 1.5rem;
border-radius: 14px;
}
.add-btn:active {
transform: scale(0.9);
}
/* Barra Flotante de Carrito / Pre-orden */
.floating-cart-bar {
position: fixed;
bottom: 16px;
left: 16px;
right: 16px;
max-width: 448px;
margin: 0 auto;
background: #0f172a;
color: white;
border-radius: 20px;
padding: 12px 18px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 10px 25px rgba(0,0,0,0.4);
z-index: 50;
cursor: pointer;
}
body.mode-kids .floating-cart-bar {
background: #0284c7;
border: 2px solid white;
}
.cart-summary {
display: flex;
align-items: center;
gap: 12px;
}
.cart-count-badge {
background: var(--accent);
color: #0f172a;
font-weight: 900;
padding: 4px 10px;
border-radius: 12px;
font-size: 0.9rem;
}
.cart-total-text {
font-size: 1.1rem;
font-weight: 800;
}
.cart-action-btn {
background: var(--secondary);
color: white;
border: none;
padding: 8px 16px;
border-radius: 12px;
font-weight: 800;
font-size: 0.9rem;
cursor: pointer;
}
/* ==========================================================================
TERMINAL POS SODA (pos.html)
========================================================================== */
.pos-layout {
display: grid;
grid-template-columns: 1fr 420px;
height: 100vh;
overflow: hidden;
background: #0f172a;
color: #f8fafc;
}
.pos-catalog-pane {
padding: 20px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 16px;
}
.pos-tabs {
display: flex;
gap: 10px;
border-bottom: 2px solid #334155;
padding-bottom: 12px;
}
.pos-tab-btn {
background: #1e293b;
border: 1px solid #334155;
color: #94a3b8;
padding: 10px 18px;
border-radius: 10px;
font-size: 0.95rem;
font-weight: 800;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
}
.pos-tab-btn.active {
background: #0284c7;
color: white;
border-color: #0284c7;
}
.pos-products-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 14px;
}
.pos-prod-card {
background: #1e293b;
border: 1px solid #334155;
border-radius: 14px;
padding: 16px;
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 140px;
transition: all 0.15s;
}
.pos-prod-card:hover {
border-color: #38bdf8;
transform: translateY(-2px);
}
.pos-checkout-pane {
background: #1e293b;
border-left: 2px solid #334155;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 20px;
}
.scanner-feed-card {
background: #0f172a;
border: 2px dashed #0284c7;
border-radius: 16px;
padding: 16px;
text-align: center;
position: relative;
overflow: hidden;
}
.camera-preview {
width: 100%;
height: 180px;
background: #000000;
border-radius: 10px;
object-fit: cover;
display: block;
}
.laser-scan-line {
position: absolute;
top: 20px;
left: 16px;
right: 16px;
height: 2px;
background: #ef4444;
box-shadow: 0 0 10px #ef4444;
animation: scanMove 2s infinite ease-in-out;
}
@keyframes scanMove {
0% { top: 20px; opacity: 0.8; }
50% { top: 180px; opacity: 1; }
100% { top: 20px; opacity: 0.8; }
}
.pos-cart-list {
flex-grow: 1;
overflow-y: auto;
margin: 16px 0;
display: flex;
flex-direction: column;
gap: 8px;
}
.pos-cart-item {
display: flex;
justify-content: space-between;
align-items: center;
background: #0f172a;
padding: 10px 14px;
border-radius: 10px;
border: 1px solid #334155;
}
/* ==========================================================================
CARNÉ ESCOLAR FÍSICO IMPRIMIBLE (carnet.html)
========================================================================== */
.carnets-sheet {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15mm;
padding: 10mm;
}
.carnet-card {
width: 85.6mm;
height: 54mm;
border: 1.5px solid #cbd5e1;
border-radius: 3.5mm;
padding: 3mm 4mm;
display: flex;
flex-direction: column;
justify-content: space-between;
background: white;
color: #0f172a;
position: relative;
box-sizing: border-box;
page-break-inside: avoid;
}
.carnet-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2px solid #0284c7;
padding-bottom: 1.5mm;
}
.carnet-school-name {
font-size: 7.5pt;
font-weight: 800;
color: #0284c7;
text-transform: uppercase;
}
.carnet-body {
display: flex;
gap: 3mm;
align-items: center;
margin: 2mm 0;
}
.carnet-photo {
width: 22mm;
height: 22mm;
border-radius: 2mm;
border: 1px solid #cbd5e1;
object-fit: cover;
}
.carnet-details {
flex: 1;
}
.carnet-name {
font-size: 9pt;
font-weight: 900;
line-height: 1.15;
margin-bottom: 1mm;
}
.carnet-meta-item {
font-size: 6.8pt;
color: #475569;
}
.carnet-qr {
width: 20mm;
height: 20mm;
border: 1px solid #e2e8f0;
}
.carnet-footer {
font-size: 5.5pt;
color: #64748b;
border-top: 1px solid #e2e8f0;
padding-top: 1mm;
display: flex;
justify-content: space-between;
}
@media print {
body {
background: white !important;
padding: 0 !important;
}
.no-print {
display: none !important;
}
.carnet-card {
border: 1px solid #94a3b8;
box-shadow: none;
}
}