Some checks failed
CI / Check / macos-latest (push) Has been cancelled
CI / Check / ubuntu-latest (push) Has been cancelled
CI / Check / windows-latest (push) Has been cancelled
CI / Test / macos-latest (push) Has been cancelled
CI / Test / ubuntu-latest (push) Has been cancelled
CI / Test / windows-latest (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Security Audit (push) Has been cancelled
CI / Secrets Scan (push) Has been cancelled
CI / Install Script Smoke Test (push) Has been cancelled
517 lines
12 KiB
CSS
517 lines
12 KiB
CSS
/* OpenFang Layout — Grid + Sidebar + Responsive */
|
|
/* Enhanced with UI/UX Pro Max guidelines */
|
|
|
|
.app-layout {
|
|
display: flex;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Sidebar */
|
|
.sidebar {
|
|
width: var(--sidebar-width);
|
|
background: var(--bg-primary);
|
|
border-right: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-shrink: 0;
|
|
transition: width var(--transition-normal);
|
|
z-index: var(--z-fixed, 300);
|
|
}
|
|
|
|
.sidebar.collapsed {
|
|
width: var(--sidebar-collapsed);
|
|
}
|
|
|
|
.sidebar.collapsed .sidebar-label,
|
|
.sidebar.collapsed .sidebar-header-text,
|
|
.sidebar.collapsed .nav-label { display: none; }
|
|
|
|
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px 0; }
|
|
|
|
.sidebar-header {
|
|
padding: 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
min-height: 60px;
|
|
}
|
|
|
|
.sidebar-logo {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.sidebar-logo img {
|
|
width: 28px;
|
|
height: 28px;
|
|
opacity: 0.8;
|
|
transition: opacity 0.2s, transform 0.2s;
|
|
}
|
|
|
|
.sidebar-logo img:hover {
|
|
opacity: 1;
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.sidebar-header h1 {
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
color: var(--accent);
|
|
letter-spacing: 3px;
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
.sidebar-header .version {
|
|
font-size: 9px;
|
|
color: var(--text-muted);
|
|
margin-top: 1px;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.sidebar-status {
|
|
font-size: 11px;
|
|
color: var(--success);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 8px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.sidebar-status.offline { color: var(--error); }
|
|
|
|
.status-dot {
|
|
width: 6px; height: 6px;
|
|
border-radius: 50%;
|
|
background: currentColor;
|
|
flex-shrink: 0;
|
|
box-shadow: 0 0 6px currentColor;
|
|
}
|
|
|
|
.conn-badge {
|
|
font-size: 9px;
|
|
padding: 1px 5px;
|
|
border-radius: 3px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.5px;
|
|
margin-left: auto;
|
|
}
|
|
.conn-badge.ws { background: var(--success); color: #000; }
|
|
.conn-badge.http { background: var(--warning); color: #000; }
|
|
|
|
/* Navigation */
|
|
.sidebar-nav {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 8px;
|
|
scrollbar-width: none;
|
|
}
|
|
.sidebar-nav::-webkit-scrollbar { width: 0; }
|
|
|
|
.nav-section {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.nav-section-title {
|
|
font-size: 9px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1.5px;
|
|
color: var(--text-muted);
|
|
padding: 12px 12px 4px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.sidebar.collapsed .nav-section-title { display: none; }
|
|
|
|
.nav-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 9px 12px;
|
|
border-radius: var(--radius-md);
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
color: var(--text-dim);
|
|
transition: all var(--transition-fast);
|
|
text-decoration: none;
|
|
border: 1px solid transparent;
|
|
white-space: nowrap;
|
|
font-weight: 500;
|
|
min-height: 36px; /* Minimum touch target */
|
|
}
|
|
|
|
.nav-item:hover {
|
|
background: var(--surface2);
|
|
color: var(--text);
|
|
transform: translateX(2px);
|
|
}
|
|
|
|
.nav-item.active {
|
|
background: var(--accent);
|
|
color: var(--bg-primary);
|
|
font-weight: 600;
|
|
box-shadow: var(--shadow-sm), 0 2px 8px rgba(255, 92, 0, 0.2);
|
|
}
|
|
|
|
.nav-icon {
|
|
width: 18px;
|
|
height: 18px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.nav-icon svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
fill: none;
|
|
stroke: currentColor;
|
|
stroke-width: 2;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
|
|
/* Sidebar toggle button */
|
|
.sidebar-toggle {
|
|
padding: 10px 16px;
|
|
border-top: 1px solid var(--border);
|
|
cursor: pointer;
|
|
text-align: center;
|
|
font-size: 14px;
|
|
color: var(--text-muted);
|
|
transition: color var(--transition-fast);
|
|
}
|
|
|
|
.sidebar-toggle:hover { color: var(--text); }
|
|
|
|
/* Main content area */
|
|
.main-content {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
background: var(--bg);
|
|
}
|
|
|
|
/* Page wrapper divs (rendered by x-if) must fill the column
|
|
and be flex containers so .page-body can scroll. */
|
|
.main-content > div {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.page-header {
|
|
padding: 14px 24px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--bg-primary);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
min-height: var(--header-height);
|
|
}
|
|
|
|
.page-header h2 {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
.page-body {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
padding: 24px;
|
|
}
|
|
|
|
/* Mobile overlay */
|
|
.sidebar-overlay {
|
|
display: none;
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.6);
|
|
z-index: 99;
|
|
}
|
|
|
|
/* Wide desktop — larger card grids */
|
|
@media (min-width: 1400px) {
|
|
.card-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
|
|
}
|
|
|
|
/* Responsive — tablet breakpoint */
|
|
@media (max-width: 1024px) {
|
|
.card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
|
|
.security-grid { grid-template-columns: 1fr; }
|
|
.cost-charts-row { grid-template-columns: 1fr; }
|
|
.overview-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
|
|
.page-body { padding: 16px; }
|
|
}
|
|
|
|
/* Responsive — mobile breakpoint */
|
|
@media (max-width: 768px) {
|
|
.sidebar {
|
|
position: fixed;
|
|
left: -300px;
|
|
top: 0;
|
|
bottom: 0;
|
|
transition: left var(--transition-normal);
|
|
}
|
|
.sidebar.mobile-open {
|
|
left: 0;
|
|
}
|
|
.sidebar.mobile-open + .sidebar-overlay {
|
|
display: block;
|
|
}
|
|
.sidebar.collapsed {
|
|
width: var(--sidebar-width);
|
|
left: -300px;
|
|
}
|
|
.mobile-menu-btn { display: flex !important; }
|
|
}
|
|
|
|
@media (min-width: 769px) {
|
|
.mobile-menu-btn { display: none !important; }
|
|
}
|
|
|
|
/* Mobile small screen */
|
|
@media (max-width: 480px) {
|
|
.page-header { flex-direction: column; gap: 8px; align-items: flex-start; padding: 12px 16px; }
|
|
.page-body { padding: 12px; }
|
|
.stats-row { flex-wrap: wrap; }
|
|
.stat-card { min-width: 80px; flex: 1 1 40%; }
|
|
.stat-card-lg { min-width: 80px; flex: 1 1 40%; padding: 12px; }
|
|
.stat-card-lg .stat-value { font-size: 22px; }
|
|
.card-grid { grid-template-columns: 1fr; }
|
|
.overview-grid { grid-template-columns: 1fr; }
|
|
.input-area { padding: 8px 12px; }
|
|
.main-content { padding: 0; }
|
|
.table-wrap { font-size: 10px; }
|
|
.modal { margin: 8px; max-height: calc(100vh - 16px); }
|
|
}
|
|
|
|
/* Touch-friendly tap targets */
|
|
@media (pointer: coarse) {
|
|
.btn { min-height: 44px; min-width: 44px; }
|
|
.nav-item { min-height: 44px; padding: 12px; }
|
|
.form-input, .form-select, .form-textarea { min-height: 44px; }
|
|
.toggle { min-width: 44px; min-height: 28px; }
|
|
.tab { min-height: 44px; padding: 12px 16px; }
|
|
.filter-pill, .wizard-category-pill { min-height: 44px; }
|
|
}
|
|
|
|
/* Focus mode — hide sidebar for distraction-free chat */
|
|
.app-layout.focus-mode .sidebar { display: none; }
|
|
.app-layout.focus-mode .sidebar-overlay { display: none; }
|
|
.app-layout.focus-mode .main-content { max-width: 100%; margin-left: 0; }
|
|
.app-layout.focus-mode .mobile-menu-btn { display: none !important; }
|
|
|
|
/* ═══════════════════════════════════════════════════════════════════════════
|
|
UI/UX Pro Max Layout Enhancements
|
|
═══════════════════════════════════════════════════════════════════════════ */
|
|
|
|
/* Z-index scale for consistent layering */
|
|
.sidebar { z-index: var(--z-sticky, 200); }
|
|
.sidebar-overlay { z-index: calc(var(--z-sticky, 200) - 1); }
|
|
.mobile-menu-btn { z-index: var(--z-fixed, 300); }
|
|
|
|
/* Improved responsive breakpoints */
|
|
/* Extra small devices (phones, 480px and below) */
|
|
@media (max-width: 480px) {
|
|
.sidebar {
|
|
width: 100%;
|
|
max-width: 280px;
|
|
}
|
|
.page-header {
|
|
padding: 12px 16px;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
.page-header h2 {
|
|
font-size: 14px;
|
|
}
|
|
.stats-row {
|
|
gap: 8px;
|
|
}
|
|
.stat-card, .stat-card-lg {
|
|
padding: 12px 16px;
|
|
min-width: unset;
|
|
flex: 1 1 calc(50% - 4px);
|
|
}
|
|
.card-grid {
|
|
grid-template-columns: 1fr;
|
|
gap: 12px;
|
|
}
|
|
.overview-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
.modal {
|
|
margin: 8px;
|
|
max-height: calc(100vh - 16px);
|
|
width: calc(100% - 16px);
|
|
}
|
|
}
|
|
|
|
/* Small devices (tablets portrait, 481px to 768px) */
|
|
@media (min-width: 481px) and (max-width: 768px) {
|
|
.card-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
|
}
|
|
.overview-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
|
}
|
|
}
|
|
|
|
/* Medium devices (tablets landscape, 769px to 1024px) */
|
|
@media (min-width: 769px) and (max-width: 1024px) {
|
|
.card-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
}
|
|
.sidebar {
|
|
width: 200px;
|
|
}
|
|
}
|
|
|
|
/* Large devices (desktops, 1025px to 1400px) */
|
|
@media (min-width: 1025px) and (max-width: 1400px) {
|
|
.card-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
}
|
|
}
|
|
|
|
/* Extra large devices (large desktops, 1401px and above) */
|
|
@media (min-width: 1401px) {
|
|
.card-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
}
|
|
.overview-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
}
|
|
}
|
|
|
|
/* Sidebar improvements */
|
|
.sidebar-header {
|
|
position: sticky;
|
|
top: 0;
|
|
background: var(--bg-primary);
|
|
z-index: 10;
|
|
}
|
|
|
|
/* Main content area improvements */
|
|
.main-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
background: var(--bg);
|
|
}
|
|
|
|
/* Page body scroll improvements */
|
|
.page-body {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding: 24px;
|
|
scroll-behavior: smooth;
|
|
overscroll-behavior: contain;
|
|
}
|
|
|
|
/* Better keyboard navigation for sidebar */
|
|
.nav-item:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: -2px;
|
|
background: var(--surface2);
|
|
}
|
|
|
|
/* Mobile menu button improvements */
|
|
.mobile-menu-btn {
|
|
position: fixed;
|
|
top: 8px;
|
|
left: 8px;
|
|
z-index: var(--z-fixed, 300);
|
|
padding: 8px 12px;
|
|
border-radius: var(--radius-md);
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
box-shadow: var(--shadow-sm);
|
|
transition: all var(--transition-fast);
|
|
}
|
|
.mobile-menu-btn:hover {
|
|
background: var(--surface2);
|
|
border-color: var(--border-light);
|
|
}
|
|
.mobile-menu-btn:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Safe area insets for mobile devices */
|
|
@supports (padding: env(safe-area-inset-bottom)) {
|
|
.input-area {
|
|
padding-bottom: calc(16px + env(safe-area-inset-bottom));
|
|
}
|
|
.sidebar {
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
}
|
|
}
|
|
|
|
/* Container query support for responsive components */
|
|
@container (min-width: 400px) {
|
|
.card-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
}
|
|
}
|
|
|
|
/* Grid layout improvements */
|
|
.card-grid {
|
|
display: grid;
|
|
gap: 16px;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
}
|
|
|
|
/* Flexbox utilities */
|
|
.flex-wrap { flex-wrap: wrap; }
|
|
.flex-1 { flex: 1; }
|
|
.flex-grow { flex-grow: 1; }
|
|
.flex-shrink-0 { flex-shrink: 0; }
|
|
|
|
/* Gap utilities */
|
|
.gap-1 { gap: 4px; }
|
|
.gap-2 { gap: 8px; }
|
|
.gap-3 { gap: 12px; }
|
|
.gap-4 { gap: 16px; }
|
|
.gap-6 { gap: 24px; }
|
|
|
|
/* Padding utilities */
|
|
.p-2 { padding: 8px; }
|
|
.p-3 { padding: 12px; }
|
|
.p-4 { padding: 16px; }
|
|
.px-2 { padding-left: 8px; padding-right: 8px; }
|
|
.px-4 { padding-left: 16px; padding-right: 16px; }
|
|
.py-2 { padding-top: 8px; padding-bottom: 8px; }
|
|
.py-4 { padding-top: 16px; padding-bottom: 16px; }
|
|
|
|
/* Margin utilities */
|
|
.m-0 { margin: 0; }
|
|
.mt-1 { margin-top: 4px; }
|
|
.mt-2 { margin-top: 8px; }
|
|
.mt-4 { margin-top: 16px; }
|
|
.mb-1 { margin-bottom: 4px; }
|
|
.mb-2 { margin-bottom: 8px; }
|
|
.mb-4 { margin-bottom: 16px; }
|
|
.mx-auto { margin-left: auto; margin-right: auto; }
|
|
|
|
/* Width utilities */
|
|
.w-full { width: 100%; }
|
|
.max-w-sm { max-width: 24rem; }
|
|
.max-w-md { max-width: 28rem; }
|
|
.max-w-lg { max-width: 32rem; }
|
|
.max-w-xl { max-width: 36rem; }
|