Initial commit — MarineInvoice v1.0
Multi-tenant marine invoicing system: Stripe payments, PDF generation, digital signatures, QR codes, SMTP email, bilingual templates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,208 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}MarineInvoice Pro{% endblock %}</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--navy: #0a1628; --navy-mid: #112240; --navy-light: #1a3a6b;
|
||||
--gold: #c9a84c; --gold-light: #e8c97a; --white: #f8f9fc;
|
||||
--gray: #8892a4; --gray-light: #e2e8f0; --success: #2ecc71;
|
||||
--danger: #e74c3c; --shadow: 0 8px 32px rgba(0,0,0,0.3);
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body { font-family: 'DM Sans', sans-serif; background: var(--navy); color: var(--white); min-height: 100vh; }
|
||||
.app-header {
|
||||
background: linear-gradient(135deg, var(--navy-mid), var(--navy));
|
||||
border-bottom: 1px solid rgba(201,168,76,0.3);
|
||||
padding: 0 24px; display: flex; align-items: center;
|
||||
justify-content: space-between; height: 64px;
|
||||
position: sticky; top: 0; z-index: 100;
|
||||
}
|
||||
.app-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
|
||||
.logo-icon {
|
||||
width: 40px; height: 40px;
|
||||
background: linear-gradient(135deg, var(--gold), var(--gold-light));
|
||||
border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px;
|
||||
}
|
||||
.logo-text { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--white); }
|
||||
.logo-text span { color: var(--gold); }
|
||||
nav { display: flex; gap: 4px; align-items: center; }
|
||||
.nav-btn {
|
||||
background: none; border: none; color: var(--gray);
|
||||
padding: 8px 14px; border-radius: 8px; cursor: pointer;
|
||||
font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
|
||||
transition: all 0.2s; text-decoration: none; display: flex; align-items: center; gap: 5px;
|
||||
}
|
||||
.nav-btn:hover { background: rgba(255,255,255,0.08); color: var(--white); }
|
||||
.nav-btn.active { background: rgba(201,168,76,0.15); color: var(--gold); }
|
||||
.nav-user {
|
||||
display: flex; align-items: center; gap: 10px;
|
||||
padding: 6px 12px; background: rgba(255,255,255,0.06);
|
||||
border-radius: 20px; font-size: 13px; color: var(--gray);
|
||||
}
|
||||
.nav-user strong { color: var(--white); }
|
||||
.badge-role {
|
||||
padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase;
|
||||
}
|
||||
.badge-superadmin { background: rgba(201,168,76,0.2); color: var(--gold); }
|
||||
.badge-admin { background: rgba(100,181,246,0.2); color: #64b5f6; }
|
||||
.badge-user { background: rgba(46,204,113,0.2); color: var(--success); }
|
||||
.main { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
|
||||
.card { background: var(--navy-mid); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 24px; margin-bottom: 20px; }
|
||||
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
|
||||
.card-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 600; }
|
||||
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
|
||||
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
|
||||
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
|
||||
@media(max-width:900px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
|
||||
@media(max-width:768px) { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } nav { display: none; } .mobile-menu { display: flex !important; } }
|
||||
.form-group { margin-bottom: 16px; }
|
||||
label { display: block; font-size: 11px; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
|
||||
input,select,textarea {
|
||||
width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
|
||||
border-radius: 10px; padding: 10px 14px; color: var(--white);
|
||||
font-family: 'DM Sans', sans-serif; font-size: 14px; transition: border-color 0.2s; outline: none;
|
||||
}
|
||||
input:focus,select:focus,textarea:focus { border-color: var(--gold); background: rgba(201,168,76,0.08); }
|
||||
select option { background: var(--navy-mid); color: var(--white); }
|
||||
textarea { resize: vertical; min-height: 80px; }
|
||||
.btn { padding: 9px 18px; border-radius: 10px; border: none; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 5px; }
|
||||
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--navy); }
|
||||
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,168,76,0.4); }
|
||||
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--white); border: 1px solid rgba(255,255,255,0.15); }
|
||||
.btn-secondary:hover { background: rgba(255,255,255,0.14); }
|
||||
.btn-danger { background: rgba(231,76,60,0.15); color: var(--danger); border: 1px solid rgba(231,76,60,0.3); }
|
||||
.btn-success { background: linear-gradient(135deg, #27ae60, #2ecc71); color: white; }
|
||||
.btn-sm { padding: 5px 12px; font-size: 12px; }
|
||||
.list-item { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s; }
|
||||
.list-item:hover { background: rgba(255,255,255,0.07); border-color: rgba(201,168,76,0.2); }
|
||||
.list-item-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
|
||||
.list-item-info p { font-size: 12px; color: var(--gray); }
|
||||
.list-item-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
|
||||
.badge { padding: 3px 9px; border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
|
||||
.badge-gold { background: rgba(201,168,76,0.2); color: var(--gold); }
|
||||
.badge-blue { background: rgba(100,181,246,0.15); color: #64b5f6; }
|
||||
.badge-green { background: rgba(46,204,113,0.15); color: var(--success); }
|
||||
.badge-gray { background: rgba(136,146,164,0.15); color: var(--gray); }
|
||||
.stat-card { background: var(--navy-mid); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 20px; }
|
||||
.stat-icon { font-size: 24px; margin-bottom: 10px; }
|
||||
.stat-label { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
|
||||
.stat-value { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; }
|
||||
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray); }
|
||||
.empty-state .emoji { font-size: 48px; margin-bottom: 16px; }
|
||||
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--white); }
|
||||
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000; justify-content: center; align-items: center; padding: 20px; overflow-y: auto; }
|
||||
.modal-overlay.active { display: flex; }
|
||||
.modal { background: var(--navy-mid); border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; padding: 32px; width: 100%; max-width: 650px; box-shadow: var(--shadow); }
|
||||
@media (max-width: 768px) {
|
||||
.modal-overlay { align-items: flex-start; padding: 12px; }
|
||||
.modal { padding: 20px; border-radius: 14px; margin: auto; }
|
||||
}
|
||||
.modal-lg { max-width: 900px; }
|
||||
.modal-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; margin-bottom: 24px; color: var(--gold); }
|
||||
.modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; }
|
||||
.divider { height: 1px; background: rgba(255,255,255,0.08); margin: 20px 0; }
|
||||
.page-title { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; margin-bottom: 4px; }
|
||||
.page-subtitle { color: var(--gray); font-size: 13px; margin-bottom: 24px; }
|
||||
.flex { display: flex; }
|
||||
.gap-2 { gap: 8px; }
|
||||
.gap-3 { gap: 12px; }
|
||||
.items-center { align-items: center; }
|
||||
.justify-between { justify-content: space-between; }
|
||||
.mt-3 { margin-top: 12px; }
|
||||
.mb-4 { margin-bottom: 20px; }
|
||||
.totals-box { background: rgba(201,168,76,0.08); border: 1px solid rgba(201,168,76,0.2); border-radius: 12px; padding: 16px; width: 280px; margin-left: auto; }
|
||||
.totals-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; color: var(--gray); }
|
||||
.totals-row.total { font-size: 17px; font-weight: 700; color: var(--gold); border-top: 1px solid rgba(201,168,76,0.3); margin-top: 8px; padding-top: 10px; }
|
||||
.line-items-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
|
||||
.line-items-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray); padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.1); }
|
||||
.line-items-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
|
||||
.line-items-table td input, .line-items-table td select { padding: 5px 8px; font-size: 12px; }
|
||||
.toast { position: fixed; top: 76px; right: 20px; background: var(--navy-mid); border: 1px solid rgba(201,168,76,0.4); border-radius: 12px; padding: 12px 18px; font-size: 13px; z-index: 2000; transform: translateX(300%); transition: transform 0.3s; box-shadow: var(--shadow); }
|
||||
.toast.show { transform: translateX(0); }
|
||||
.toast.success { border-color: rgba(46,204,113,0.4); color: var(--success); }
|
||||
.toast.error { border-color: rgba(231,76,60,0.4); color: var(--danger); }
|
||||
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--navy-mid); border-top: 1px solid rgba(255,255,255,0.1); padding: 6px; z-index: 100; justify-content: space-around; }
|
||||
@media(max-width:768px) { .mobile-nav { display: flex; } .main { padding-bottom: 80px; } }
|
||||
.mobile-nav-btn { background: none; border: none; color: var(--gray); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 9px; font-family: 'DM Sans', sans-serif; cursor: pointer; padding: 5px 10px; border-radius: 8px; text-decoration: none; }
|
||||
.mobile-nav-btn.active { color: var(--gold); background: rgba(201,168,76,0.1); }
|
||||
.mobile-nav-btn .ico { font-size: 18px; }
|
||||
.flash-messages { margin-bottom: 20px; }
|
||||
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 10px; font-size: 13px; }
|
||||
.flash-success { background: rgba(46,204,113,0.15); border: 1px solid rgba(46,204,113,0.3); color: var(--success); }
|
||||
.flash-error { background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.3); color: var(--danger); }
|
||||
</style>
|
||||
{% block extra_css %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<header class="app-header">
|
||||
<a href="/" class="app-logo">
|
||||
<div class="logo-icon">⚓</div>
|
||||
<span class="logo-text">Marine<span>Invoice</span> Pro</span>
|
||||
</a>
|
||||
<nav>
|
||||
<a href="/" class="nav-btn {% if request.endpoint == 'dashboard' %}active{% endif %}">📊 Dashboard</a>
|
||||
{% if current_user.is_superadmin() %}
|
||||
<a href="/companies" class="nav-btn {% if request.endpoint == 'companies' %}active{% endif %}">🏢 Compañías</a>
|
||||
<a href="/users" class="nav-btn {% if request.endpoint == 'users' %}active{% endif %}">👤 Usuarios</a>
|
||||
{% endif %}
|
||||
<a href="/clients" class="nav-btn {% if request.endpoint == 'clients' %}active{% endif %}">👥 Clientes</a>
|
||||
<a href="/products" class="nav-btn {% if request.endpoint == 'products' %}active{% endif %}">🔧 Productos</a>
|
||||
<a href="/invoices" class="nav-btn {% if request.endpoint == 'invoices' %}active{% endif %}">📄 Invoices</a>
|
||||
<a href="/quotes" class="nav-btn {% if request.endpoint == 'quotes' %}active{% endif %}">📋 Cotizaciones</a>
|
||||
<div class="nav-user">
|
||||
<strong>{{ current_user.full_name or current_user.username }}</strong>
|
||||
<span class="badge-role badge-{{ current_user.role }}">{{ current_user.role }}</span>
|
||||
</div>
|
||||
<a href="/profile" class="btn btn-secondary btn-sm">👤 Mi Perfil</a>
|
||||
<a href="/logout" class="btn btn-secondary btn-sm">Salir</a>
|
||||
</nav>
|
||||
</header>
|
||||
<nav class="mobile-nav">
|
||||
<a href="/" class="mobile-nav-btn {% if request.endpoint == 'dashboard' %}active{% endif %}"><span class="ico">📊</span>Home</a>
|
||||
{% if current_user.is_superadmin() %}<a href="/companies" class="mobile-nav-btn {% if request.endpoint == 'companies' %}active{% endif %}"><span class="ico">🏢</span>Cias</a>{% endif %}
|
||||
<a href="/clients" class="mobile-nav-btn {% if request.endpoint == 'clients' %}active{% endif %}"><span class="ico">👥</span>Clientes</a>
|
||||
<a href="/products" class="mobile-nav-btn {% if request.endpoint == 'products' %}active{% endif %}"><span class="ico">🔧</span>Prods</a>
|
||||
<a href="/invoices" class="mobile-nav-btn {% if request.endpoint == 'invoices' %}active{% endif %}"><span class="ico">📄</span>Invoices</a>
|
||||
<a href="/quotes" class="mobile-nav-btn {% if request.endpoint == 'quotes' %}active{% endif %}"><span class="ico">📋</span>Cotiz.</a>
|
||||
<a href="/profile" class="mobile-nav-btn {% if request.endpoint == 'profile' %}active{% endif %}"><span class="ico">👤</span>Perfil</a>
|
||||
<a href="/logout" class="mobile-nav-btn"><span class="ico">🚪</span>Salir</a>
|
||||
</nav>
|
||||
<div class="main">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
<div class="flash-messages">
|
||||
{% for category, message in messages %}
|
||||
<div class="flash flash-{{ category }}">{{ message }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<div class="toast" id="toast"></div>
|
||||
<script>
|
||||
function showToast(msg, type='success', duration=3000) {
|
||||
const t = document.getElementById('toast');
|
||||
t.textContent = msg;
|
||||
t.className = `toast ${type} show`;
|
||||
// info style
|
||||
if (type === 'info') {
|
||||
t.style.background = 'linear-gradient(135deg,#1a6fa8,#0d5c94)';
|
||||
t.style.borderColor = 'rgba(26,111,168,0.4)';
|
||||
} else {
|
||||
t.style.background = ''; t.style.borderColor = '';
|
||||
}
|
||||
clearTimeout(t._timer);
|
||||
t._timer = setTimeout(() => t.classList.remove('show'), duration);
|
||||
}
|
||||
function openModal(id) { document.getElementById(id).classList.add('active'); }
|
||||
function closeModal(id) { document.getElementById(id).classList.remove('active'); }
|
||||
// Modal stays open on outside click — only closes via Cancel/X buttons
|
||||
</script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user