# CSS Files Structure Guide Complete guide for organizing and using CSS files in your multi-tenant ecommerce platform. ## 📁 Directory Structure ``` static/ ├── css/ │ ├── shared/ │ │ ├── base.css # Base styles (variables, reset, utilities) │ │ └── auth.css # Authentication pages (login, register) │ ├── admin/ │ │ └── admin.css # Admin interface specific styles │ └── vendor/ │ └── vendor.css # Vendor interface specific styles ``` ## 📄 File Descriptions ### 1. `static/css/shared/base.css` (8.5KB) **Purpose**: Foundation styles used across all pages **Includes**: - CSS Variables (colors, spacing, fonts, etc.) - Reset and base styles - Typography (h1-h6, paragraphs, links) - Buttons (primary, secondary, success, danger, etc.) - Form elements (inputs, selects, textareas) - Cards and badges - Alerts and notifications - Tables - Utility classes - Loading spinners - Responsive breakpoints **Used by**: ALL pages (admin, vendor, public) --- ### 2. `static/css/shared/auth.css` (6KB) **Purpose**: Styles for authentication pages **Includes**: - Login/Register page layouts - Auth containers and cards - Form styling for auth pages - Vendor info display - "No vendor found" messages - Credentials display cards - Password toggle - Social login buttons - Success/error alerts - Responsive auth layouts **Used by**: - `static/admin/login.html` - `static/vendor/login.html` - Any registration pages --- ### 3. `static/css/admin/admin.css` (7KB) **Purpose**: Admin portal specific styles **Includes**: - Admin header and navigation - Admin sidebar - Stats cards/widgets - Data tables - Empty states - Loading states - Search and filter bars - Modals/dialogs - Pagination - Responsive admin layout - Print styles **Used by**: - `static/admin/dashboard.html` - `static/admin/vendors.html` - Any admin interface pages --- ### 4. `static/css/vendor/vendor.css` (8KB) **Purpose**: Vendor portal specific styles **Includes**: - Vendor header with branding - Vendor sidebar navigation - Dashboard widgets - Welcome cards - Vendor info cards - Product grid and cards - Order lists and cards - Tabs interface - File upload areas - Progress bars - Settings forms - Responsive vendor layout - Print styles **Used by**: - `static/vendor/dashboard.html` - Any vendor interface pages - Future: marketplace, products, orders pages --- ## 🎨 CSS Variables Reference All CSS variables are defined in `base.css`: ### Colors ```css --primary-color: #667eea; --primary-dark: #764ba2; --secondary-color: #6c757d; --success-color: #28a745; --danger-color: #e74c3c; --warning-color: #ffc107; --info-color: #17a2b8; ``` ### Grays ```css --gray-50: #f9fafb; --gray-100: #f5f7fa; --gray-200: #e1e8ed; --gray-300: #d1d9e0; --gray-400: #b0bac5; --gray-500: #8796a5; --gray-600: #687785; --gray-700: #4a5568; --gray-800: #2d3748; --gray-900: #1a202c; ``` ### Spacing ```css --spacing-xs: 4px; --spacing-sm: 8px; --spacing-md: 16px; --spacing-lg: 24px; --spacing-xl: 32px; --spacing-2xl: 48px; ``` ### Font Sizes ```css --font-xs: 12px; --font-sm: 13px; --font-base: 14px; --font-md: 15px; --font-lg: 16px; --font-xl: 18px; --font-2xl: 20px; --font-3xl: 24px; --font-4xl: 32px; ``` ### Border Radius ```css --radius-sm: 4px; --radius-md: 6px; --radius-lg: 8px; --radius-xl: 12px; --radius-full: 9999px; ``` ### Shadows ```css --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1); --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15); --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3); ``` --- ## 📋 How to Use ### In Your HTML Files **Admin Login Page** (`static/admin/login.html`): ```html
``` **Admin Dashboard** (`static/admin/dashboard.html`): ```html ``` **Admin Vendor Creation** (`static/admin/vendors.html`): ```html ``` **Vendor Login Page** (`static/vendor/login.html`): ```html ``` **Vendor Dashboard** (`static/vendor/dashboard.html`): ```html ``` --- ## 🎯 Common Classes Reference ### Buttons ```html ``` ### Badges ```html Active Inactive Pending Info ``` ### Alerts ```html| Column 1 | Column 2 |
|---|---|
| Data 1 | Data 2 |
Primary color
Success color
Danger color
Muted color