# ADM-001 / ADM-002 / ADM-003 — Design ## 1. Design System ### Palette | Token | Hex | Uso | |--------------------|-----------|------------------------------| | `--color-primary` | `#2D6A4F` | Acciones principales | | `--color-primary-hover` | `#1B4332` | Hover primary | | `--color-danger` | `#DC2626` | Acciones destructivas | | `--color-warning` | `#D97706` | Estados de atención | | `--color-success` | `#059669` | Confirmaciones, éxito | | `--color-bg` | `#F9FAFB` | Fondo de página | | `--color-surface` | `#FFFFFF` | Tarjetas, panels | | `--color-border` | `#E5E7EB` | Bordes | | `--color-text` | `#111827` | Texto principal | | `--color-muted` | `#6B7280` | Texto secundario | ### Typography - **Headings**: `Playfair Display` (fuente de marca) o fallback `serif` - **Body/UI**: `Inter` (fuente del storefront) o fallback `sans-serif` - **Monospace** (SKU, IDs): `font-mono` ### Spacing - Base unit: 4px - Consistent: 4, 8, 12, 16, 24, 32, 48px ### Border radius - Buttons/inputs: `rounded-lg` (8px) - Cards: `rounded-xl` (12px) - Modals: `rounded-2xl` (16px) --- ## 2. Login Page Design ### Desktop (≥1024px) ``` ┌─────────────────────────────────────┐ │ │ │ 🌿 MercadoDeVida │ │ ───────────────── │ │ │ │ Iniciar sesión │ │ │ │ Email │ │ ┌─────────────────────────┐ │ │ │ tu@email.com │ │ │ └─────────────────────────┘ │ │ │ │ Contraseña │ │ ┌─────────────────────────┐ │ │ │ •••••••• │ │ │ └─────────────────────────┘ │ │ │ │ ┌─────────────────────────┐ │ │ │ Iniciar sesión │ │ │ └─────────────────────────┘ │ │ │ └─────────────────────────────────────┘ ``` - Centrado vertical y horizontalmente - Card blanca con sombra suave - Logo de marca - Inputs: border gris, focus ring verde - Botón: full-width, verde primary ### Mobile (< 768px) - Padding lateral 24px - Mismo layout, inputs 100% del card ### States **Loading**: Botón deshabilitado con spinner **Error**: Card con border rojo, mensaje debajo del form **Success**: Redirect inmediato --- ## 3. Admin Shell Design ### Desktop (≥1024px) ``` ┌─────────────────────────────────────────────────────────────┐ │ 🌿 MercadoDeVida Admin admin@mdv.es [Logout] │ ├──────────┬──────────────────────────────────────────────────┤ │ │ │ │ Dashboard│ [Page Title] [+ Nueva acción] │ │ 📦 Productos│ ─────────────────────────────────────────── │ │ 🧾 Pedidos│ │ │ 📊 Inventario│ [Content Area] │ │ 👥 Clientes│ │ │ 🏷 Categorías│ │ │ 🏷 Marcas│ │ │ 🏷 Promociones│ │ │ ⭐ Reseñas│ │ │ 📄 CMS │ │ │ ⚙ Ajustes│ │ │ │ │ │ ├──────────────────────────────────────────────────┤ │ │ © 2026 MercadoDeVida. Panel de administración. │ └──────────┴──────────────────────────────────────────────────┘ ``` - Sidebar: 240px fija, bg white, border-right - Header: 64px, bg white, sticky top - Content: bg `--color-bg`, padding 32px - Footer: minimal copyright ### Tablet (768px – 1023px) - Sidebar colapsa a 64px (solo iconos) - Toggle para expandir ### Mobile (< 768px) - Sidebar como drawer overlay desde la izquierda - Hamburger button en header - Overlay oscuro al abrir drawer ### Navigation Items | Icon | Label | Permission | Badge (opcional) | |------|------------|-------------------|------------------| | 📊 | Dashboard | (dashboard) | | | 📦 | Productos | products.read | | | 🧾 | Pedidos | orders.read | 3 (pendientes) | | 📊 | Inventario | inventory.read | | | 👥 | Clientes | customers.read | | | 🏷️ | Categorías | categories.read | | | 🏷️ | Marcas | brands.read | | | 🏷️ | Promociones| promotions.read | | | ⭐ | Reseñas | reviews.read | 5 (pendientes) | | 📄 | CMS | cms.read | | | ⚙️ | Ajustes | (settings) | | Active state: bg primary/10, text primary, left border 3px primary --- ## 4. Status Colors (Accessible) | Status | Color | Pattern | |-------------|--------|------------------| | Active | Green | `bg-green-100 text-green-800` | | Inactive | Gray | `bg-gray-100 text-gray-600` | | Pending | Amber | `bg-amber-100 text-amber-800` | | Paid | Green | `bg-green-100 text-green-800` | | Processing | Blue | `bg-blue-100 text-blue-800` | | Shipped | Indigo | `bg-indigo-100 text-indigo-800` | | Delivered | Green | `bg-green-100 text-green-800` | | Cancelled | Red | `bg-red-100 text-red-800` | | Refunded | Purple | `bg-purple-100 text-purple-800` | ⚠️ Usar ALWAYS el label junto al color, nunca solo el color. --- ## 5. Component Library (Admin Primitives) ### Button ```tsx ``` ### Input / Textarea ```tsx