/** * SecuBox Module - Common Styles (Design System v0.3.0) * Shared styles for consistent SecuBox design across all modules * Based on: https://cybermind.fr/apps/system-hub/demo.html * Version: 0.3.0 */ /* === Import Fonts === */ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap'); /* === Design System Variables === */ :root { /* Light Mode */ --sh-text-primary: #0f172a; --sh-text-secondary: #475569; --sh-bg-primary: #ffffff; --sh-bg-secondary: #f8fafc; --sh-bg-tertiary: #f1f5f9; --sh-bg-card: #ffffff; --sh-border: #e2e8f0; --sh-hover-bg: #f8fafc; --sh-hover-shadow: rgba(0, 0, 0, 0.1); --sh-primary: #6366f1; --sh-primary-end: #8b5cf6; --sh-shadow: rgba(0, 0, 0, 0.08); --sh-success: #22c55e; --sh-danger: #ef4444; --sh-warning: #f59e0b; --sh-info: #3b82f6; } [data-theme="dark"] { /* Dark Mode (Demo-inspired) */ --sh-text-primary: #fafafa; --sh-text-secondary: #a0a0b0; --sh-bg-primary: #0a0a0f; --sh-bg-secondary: #12121a; --sh-bg-tertiary: #1a1a24; --sh-bg-card: #12121a; --sh-border: #2a2a35; --sh-hover-bg: #1a1a24; --sh-hover-shadow: rgba(0, 0, 0, 0.6); --sh-primary: #6366f1; --sh-primary-end: #8b5cf6; --sh-shadow: rgba(0, 0, 0, 0.4); --sh-success: #22c55e; --sh-danger: #ef4444; --sh-warning: #f59e0b; --sh-info: #3b82f6; } /* === Global Typography === */ body, .module-dashboard, .sh-page-header, .sh-card { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } code, .sh-mono, .sh-id-display, .sh-metric-value, pre { font-family: 'JetBrains Mono', 'Courier New', monospace; } /* === Page Header === */ .sh-page-header { margin-bottom: 24px; padding: 24px; background: var(--sh-bg-card); border-radius: 16px; border: 1px solid var(--sh-border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; box-shadow: 0 1px 3px var(--sh-shadow); } .sh-page-title { font-size: 20px; font-weight: 700; margin: 0; background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-end)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: flex; align-items: center; gap: 12px; } .sh-page-title-icon { font-size: 24px; line-height: 1; -webkit-text-fill-color: initial; } .sh-page-subtitle { margin: 4px 0 0 0; font-size: 14px; color: var(--sh-text-secondary); font-weight: 400; } /* === Stats Badges (Compact) === */ .sh-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; } .sh-stat-badge { background: var(--sh-bg-card); padding: 16px; border-radius: 12px; border: 1px solid var(--sh-border); text-align: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .sh-stat-badge:hover { transform: translateY(-2px); box-shadow: 0 4px 12px var(--sh-shadow); border-color: var(--sh-primary); } .sh-stat-value { font-size: 28px; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--sh-text-primary); margin: 0 0 4px 0; } .sh-stat-label { font-size: 12px; color: var(--sh-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; } /* === Cards === */ .sh-card { background: var(--sh-bg-card); border-radius: 16px; border: 1px solid var(--sh-border); padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px var(--sh-shadow); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; } .sh-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--sh-primary), var(--sh-primary-end)); opacity: 0; transition: opacity 0.3s ease; } .sh-card:hover::before { opacity: 1; } .sh-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px var(--sh-shadow); border-color: var(--sh-primary); } .sh-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--sh-border); } .sh-card-title { font-size: 18px; font-weight: 600; color: var(--sh-text-primary); margin: 0; display: flex; align-items: center; gap: 8px; } .sh-card-title-icon { font-size: 20px; } .sh-card-body { color: var(--sh-text-primary); } /* === Buttons === */ .sh-btn-primary { background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-end)); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-size: 14px; display: inline-flex; align-items: center; gap: 8px; } .sh-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); } .sh-btn-secondary { background: var(--sh-bg-tertiary); color: var(--sh-text-primary); border: 1px solid var(--sh-border); padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-size: 14px; } .sh-btn-secondary:hover { background: var(--sh-hover-bg); border-color: var(--sh-primary); } /* === Navigation Tabs === */ .sh-nav-tabs { display: flex; gap: 8px; margin-bottom: 24px; padding: 8px; background: var(--sh-bg-secondary); border-radius: 12px; border: 1px solid var(--sh-border); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); } .sh-nav-tab { padding: 10px 20px; border-radius: 8px; background: transparent; border: none; color: var(--sh-text-secondary); font-weight: 500; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; font-size: 14px; } .sh-nav-tab:hover { color: var(--sh-text-primary); background: var(--sh-hover-bg); } .sh-nav-tab.active { color: var(--sh-primary); background: var(--sh-bg-card); box-shadow: 0 2px 4px var(--sh-shadow); } .sh-nav-tab.active::after { content: ''; position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px; background: linear-gradient(90deg, var(--sh-primary), var(--sh-primary-end)); border-radius: 2px; } /* === Filter Tabs === */ .sh-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } .sh-filter-tab { padding: 8px 16px; border-radius: 8px; background: var(--sh-bg-tertiary); border: 1px solid var(--sh-border); color: var(--sh-text-secondary); font-weight: 500; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-size: 13px; } .sh-filter-tab:hover { border-color: var(--sh-primary); color: var(--sh-text-primary); } .sh-filter-tab.active { background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-end)); color: white; border-color: transparent; } /* === Status Badges === */ .sh-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; } .sh-badge-success { background: rgba(34, 197, 94, 0.15); color: var(--sh-success); border: 1px solid rgba(34, 197, 94, 0.3); } .sh-badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--sh-danger); border: 1px solid rgba(239, 68, 68, 0.3); } .sh-badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--sh-warning); border: 1px solid rgba(245, 158, 11, 0.3); } .sh-badge-info { background: rgba(59, 130, 246, 0.15); color: var(--sh-info); border: 1px solid rgba(59, 130, 246, 0.3); } /* === Grid Layouts === */ .sh-grid { display: grid; gap: 20px; } .sh-grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } .sh-grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .sh-grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } /* === Utilities === */ .sh-mono { font-family: 'JetBrains Mono', monospace; } .sh-text-primary { color: var(--sh-text-primary); } .sh-text-secondary { color: var(--sh-text-secondary); } .sh-text-success { color: var(--sh-success); } .sh-text-danger { color: var(--sh-danger); } .sh-text-warning { color: var(--sh-warning); } /* === Responsive === */ @media (max-width: 768px) { .sh-page-header { flex-direction: column; align-items: flex-start; } .sh-page-title { font-size: 24px; } .sh-stats-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); } .sh-nav-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; } .sh-grid-2, .sh-grid-3, .sh-grid-4 { grid-template-columns: 1fr; } } /* === MQTT Bridge Specific Styles === */ .mqtt-bridge-dashboard { --mb-bg: var(--sh-bg-secondary); --mb-card: var(--sh-bg-card); --mb-border: var(--sh-border); --mb-text: var(--sh-text-primary); --mb-muted: var(--sh-text-secondary); --mb-accent: var(--sh-primary); --mb-danger: var(--sh-danger); background: var(--mb-bg); min-height: 100vh; padding: 24px; display: flex; flex-direction: column; gap: 24px; font-family: 'Inter', sans-serif; } .mb-card { background: var(--mb-card); border: 1px solid var(--mb-border); border-radius: 18px; padding: 24px; box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08); transition: box-shadow 0.3s ease, transform 0.3s ease; } .mb-card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12); } .mb-card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--mb-border); } .mb-card-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; color: var(--mb-text); } .mb-hero-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 12px; } .mb-hero-chip { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--mb-border); background: var(--sh-bg-tertiary); gap: 6px; } .mb-hero-chip-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mb-muted); } .mb-hero-chip strong { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: var(--mb-text); } .mb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; } .mb-stat { padding: 18px; border-radius: 16px; border: 1px solid var(--mb-border); background: var(--mb-card); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); } .mb-stat-label { font-size: 12px; text-transform: uppercase; color: var(--mb-muted); letter-spacing: 0.08em; font-weight: 600; } .mb-stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; font-family: 'JetBrains Mono', monospace; color: var(--mb-text); } .mb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 14px; transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease; } .mb-btn:focus-visible { outline: 2px solid var(--mb-accent); outline-offset: 2px; } .mb-btn-primary { background: linear-gradient(135deg, var(--mb-accent), #8b5cf6); color: #fff; box-shadow: 0 14px 30px rgba(99, 102, 241, 0.35); } .mb-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(99, 102, 241, 0.45); } .mb-btn-secondary { background: transparent; border-color: var(--mb-border); color: var(--mb-text); } .mb-device-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--mb-border); } .mb-device-row:last-child { border-bottom: none; } .mb-device-info { display: flex; flex-direction: column; gap: 4px; } .mb-device-info span { color: var(--mb-muted); font-size: 13px; } .mb-input-group { display: flex; flex-direction: column; gap: 6px; } .mb-input { border: 1px solid var(--mb-border); border-radius: 10px; padding: 10px 12px; background: var(--mb-card); color: var(--mb-text); font-family: inherit; transition: border-color 0.2s ease, box-shadow 0.2s ease; } .mb-input:focus { border-color: var(--mb-accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); outline: none; } .mb-profile-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; } .mb-profile-card { border: 1px dashed var(--mb-border); border-radius: 14px; padding: 16px; background: rgba(99, 102, 241, 0.03); display: flex; flex-direction: column; gap: 8px; } .mb-profile-header { display: flex; justify-content: space-between; gap: 12px; } .mb-profile-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--mb-muted); font-size: 12px; } .mb-profile-status { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--mb-border); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mb-muted); } .mb-profile-status.online { color: #22c55e; border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.12); } .mb-profile-notes { margin: 0; color: var(--mb-muted); font-size: 13px; } .mb-profile-hint { border: 1px solid var(--mb-border); border-radius: 12px; padding: 12px; background: var(--mb-card); } .mb-profile-hint pre { background: rgba(15, 23, 42, 0.08); border-radius: 10px; padding: 10px; font-family: 'JetBrains Mono', monospace; font-size: 12px; overflow-x: auto; } .mb-adapter-grid { display: flex; flex-direction: column; gap: 18px; } .mb-adapter-row { border: 1px solid var(--mb-border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--mb-card); } .mb-adapter-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; } .mb-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mb-text); } .mb-switch input { accent-color: var(--mb-accent); width: 16px; height: 16px; } .mb-adapter-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; } .mb-adapter-actions { display: flex; gap: 8px; } .mb-health { text-transform: uppercase; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--mb-border); } .mb-health.online { color: #22c55e; border-color: rgba(34, 197, 94, 0.6); background: rgba(34, 197, 94, 0.12); } .mb-health.missing { color: #f97316; border-color: rgba(249, 115, 22, 0.6); background: rgba(249, 115, 22, 0.12); } .mb-health.disabled, .mb-health.unknown { color: var(--mb-muted); } @media (max-width: 768px) { .mqtt-bridge-dashboard { padding: 16px; } .mb-card { padding: 18px; } .mb-card-header { flex-direction: column; align-items: flex-start; } .mb-hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }