botserver/ui/desktop/css/app.css

769 lines
19 KiB
CSS
Raw Normal View History

/* General Bots Desktop - Unified Theme System with HSL Bridge */
/* This file bridges shadcn-style HSL theme variables with working CSS properties */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
/* ============================================ */
/* DEFAULT THEME (Light Mode Base) */
/* Uses shadcn/ui HSL format for theme files */
/* ============================================ */
:root {
/* Shadcn-style HSL theme variables (can be overridden by theme files) */
--background: 0 0% 100%;
--foreground: 222 47% 11%;
--card: 0 0% 98%;
--card-foreground: 222 47% 11%;
--popover: 0 0% 100%;
--popover-foreground: 222 47% 11%;
--primary: 217 91% 60%;
--primary-foreground: 0 0% 100%;
--secondary: 214 32% 91%;
--secondary-foreground: 222 47% 11%;
--muted: 214 32% 91%;
--muted-foreground: 215 16% 47%;
--accent: 214 32% 91%;
--accent-foreground: 222 47% 11%;
--destructive: 0 84% 60%;
--destructive-foreground: 0 0% 98%;
--border: 214 32% 91%;
--input: 214 32% 91%;
--ring: 217 91% 60%;
--radius: 0.5rem;
--chart-1: 217 91% 60%;
--chart-2: 142 76% 36%;
--chart-3: 47 96% 53%;
--chart-4: 280 83% 57%;
--chart-5: 27 87% 67%;
/* Bridge: Convert HSL to working CSS variables */
--primary-bg: hsl(var(--background));
--primary-fg: hsl(var(--foreground));
--secondary-bg: hsl(var(--card));
--secondary-fg: hsl(var(--muted-foreground));
/* Glass Morphism */
--glass-bg: hsla(var(--background) / 0.7);
--glass-border: hsla(var(--border) / 0.8);
--glass-shadow: hsla(var(--foreground) / 0.05);
/* Text Colors */
--text-primary: hsl(var(--foreground));
--text-secondary: hsl(var(--muted-foreground));
--text-tertiary: hsla(var(--muted-foreground) / 0.7);
--text-muted: hsla(var(--muted-foreground) / 0.5);
/* Accent Colors */
--accent-color: hsl(var(--primary));
--accent-hover: hsl(var(--primary) / 0.9);
--accent-light: hsla(var(--primary) / 0.1);
--accent-gradient: linear-gradient(
135deg,
hsl(var(--primary)) 0%,
hsl(var(--accent)) 100%
);
/* Border Colors */
--border-color: hsl(var(--border));
--border-light: hsla(var(--border) / 0.5);
--border-dark: hsl(var(--muted-foreground));
/* Background States */
--bg-hover: hsla(var(--primary) / 0.08);
--bg-active: hsla(var(--primary) / 0.15);
--bg-disabled: hsl(var(--muted));
/* Message Bubbles */
--user-message-bg: hsl(var(--primary));
--user-message-fg: hsl(var(--primary-foreground));
--bot-message-bg: hsl(var(--card));
--bot-message-fg: hsl(var(--card-foreground));
/* Sidebar */
--sidebar-bg: hsla(var(--card) / 0.95);
--sidebar-border: hsl(var(--border));
--sidebar-item-hover: hsla(var(--primary) / 0.1);
--sidebar-item-active: hsl(var(--primary));
/* Status Colors */
--success-color: hsl(142 76% 36%);
--warning-color: hsl(38 92% 50%);
--error-color: hsl(var(--destructive));
--info-color: hsl(var(--primary));
/* Shadows */
--shadow-sm: 0 1px 2px 0 hsla(var(--foreground) / 0.05);
--shadow-md:
0 4px 6px -1px hsla(var(--foreground) / 0.1),
0 2px 4px -1px hsla(var(--foreground) / 0.06);
--shadow-lg:
0 10px 15px -3px hsla(var(--foreground) / 0.1),
0 4px 6px -2px hsla(var(--foreground) / 0.05);
--shadow-xl:
0 20px 25px -5px hsla(var(--foreground) / 0.1),
0 10px 10px -5px hsla(var(--foreground) / 0.04);
/* Spacing */
--space-xs: 4px;
--space-sm: 8px;
--space-md: 16px;
--space-lg: 24px;
--space-xl: 32px;
--space-2xl: 48px;
/* Border Radius (use theme radius or fallback) */
--radius-sm: calc(var(--radius) * 0.5);
--radius-md: var(--radius);
--radius-lg: calc(var(--radius) * 1.5);
--radius-xl: calc(var(--radius) * 2);
--radius-2xl: calc(var(--radius) * 3);
--radius-full: 9999px;
/* Transitions */
--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
/* Header */
--header-bg: hsla(var(--background) / 0.8);
--header-border: hsla(var(--border) / 0.8);
--header-height: 64px;
/* Input Fields */
--input-bg: hsl(var(--input));
--input-border: hsl(var(--border));
--input-focus-border: hsl(var(--ring));
--input-placeholder: hsl(var(--muted-foreground));
/* Scrollbar */
--scrollbar-track: hsl(var(--muted));
--scrollbar-thumb: hsla(var(--muted-foreground) / 0.3);
--scrollbar-thumb-hover: hsla(var(--muted-foreground) / 0.5);
/* Z-Index Layers */
--z-dropdown: 1000;
--z-sticky: 1020;
--z-fixed: 1030;
--z-modal-backdrop: 1040;
--z-modal: 1050;
--z-popover: 1060;
--z-tooltip: 1070;
}
/* ============================================ */
/* DARK MODE DETECTION */
/* Auto-apply dark theme if system prefers dark */
/* (Can be overridden by theme files) */
/* ============================================ */
@media (prefers-color-scheme: dark) {
:root:not([data-theme]) {
--background: 222 47% 11%;
--foreground: 213 31% 91%;
--card: 217 33% 17%;
--card-foreground: 213 31% 91%;
--popover: 222 47% 11%;
--popover-foreground: 213 31% 91%;
--primary: 217 91% 60%;
--primary-foreground: 222 47% 11%;
--secondary: 217 33% 17%;
--secondary-foreground: 213 31% 91%;
--muted: 223 47% 11%;
--muted-foreground: 215 20% 65%;
--accent: 217 33% 17%;
--accent-foreground: 213 31% 91%;
--destructive: 0 63% 31%;
--destructive-foreground: 213 31% 91%;
--border: 217 33% 17%;
--input: 217 33% 17%;
--ring: 224 76% 48%;
}
}
/* ============================================ */
/* GLOBAL RESETS */
/* ============================================ */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 16px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
font-family:
"Inter",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Oxygen,
Ubuntu,
sans-serif;
background: var(--primary-bg);
color: var(--primary-fg);
height: 100vh;
overflow: hidden;
transition:
background var(--transition-smooth),
color var(--transition-smooth);
}
/* ============================================ */
/* LAYOUT STRUCTURE */
/* ============================================ */
#main-content {
height: 100vh;
width: 100vw;
overflow: hidden;
position: relative;
}
.section {
height: 100%;
width: 100%;
overflow: hidden;
display: none;
}
.section.active {
display: flex;
}
/* ============================================ */
/* FLOATING HEADER */
/* ============================================ */
.float-header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: var(--header-height);
background: var(--header-bg);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border-bottom: 1px solid var(--header-border);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 var(--space-lg);
z-index: var(--z-sticky);
box-shadow: var(--shadow-sm);
transition: all var(--transition-smooth);
}
.header-left {
display: flex;
align-items: center;
gap: var(--space-md);
}
.header-right {
display: flex;
align-items: center;
gap: var(--space-sm);
}
.logo-wrapper {
display: flex;
align-items: center;
gap: var(--space-sm);
cursor: pointer;
padding: var(--space-sm);
border-radius: var(--radius-md);
transition: all var(--transition-fast);
background: var(--glass-bg);
border: 1px solid var(--glass-border);
}
.logo-wrapper:hover {
background: var(--bg-hover);
transform: scale(1.02);
border-color: var(--accent-color);
}
.logo-icon {
width: 36px;
height: 36px;
background: url("https://pragmatismo.com.br/icons/general-bots.svg")
center/contain no-repeat;
border-radius: var(--radius-sm);
}
.logo-text {
font-size: 18px;
font-weight: 700;
color: var(--text-primary);
transition: color var(--transition-fast);
}
/* ============================================ */
/* ICON BUTTONS (Apps, Theme, User) */
/* ============================================ */
.icon-button {
width: 40px;
height: 40px;
border-radius: var(--radius-full);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border: 1px solid var(--border-color);
background: var(--glass-bg);
color: var(--text-primary);
transition: all var(--transition-fast);
backdrop-filter: blur(10px);
}
.icon-button:hover {
background: var(--bg-hover);
border-color: var(--accent-color);
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.icon-button:active {
transform: translateY(0);
}
.icon-button svg {
width: 20px;
height: 20px;
}
/* ============================================ */
/* THEME DROPDOWN */
/* ============================================ */
.theme-dropdown {
padding: 8px 16px;
background: var(--glass-bg);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
color: var(--text-primary);
font-family: inherit;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all var(--transition-fast);
backdrop-filter: blur(10px);
outline: none;
}
.theme-dropdown:hover {
border-color: var(--accent-color);
box-shadow: var(--shadow-sm);
}
.theme-dropdown:focus {
border-color: var(--accent-color);
box-shadow: 0 0 0 3px var(--accent-light);
}
.theme-dropdown option {
background: var(--primary-bg);
color: var(--text-primary);
padding: 8px;
}
/* ============================================ */
/* APPS DROPDOWN MENU */
/* ============================================ */
.apps-dropdown {
position: absolute;
top: calc(100% + 8px);
right: 60px;
width: 280px;
background: var(--glass-bg);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border: 1px solid var(--glass-border);
border-radius: var(--radius-xl);
box-shadow: var(--shadow-xl);
padding: var(--space-md);
opacity: 0;
transform: translateY(-10px) scale(0.95);
pointer-events: none;
transition: all var(--transition-smooth);
z-index: var(--z-dropdown);
}
.apps-dropdown.show {
opacity: 1;
transform: translateY(0) scale(1);
pointer-events: all;
}
.apps-dropdown-title {
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-tertiary);
margin-bottom: var(--space-md);
padding-left: var(--space-sm);
}
.app-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: var(--space-sm);
}
.app-item {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-sm);
padding: var(--space-md);
border-radius: var(--radius-lg);
text-decoration: none;
color: var(--text-primary);
transition: all var(--transition-fast);
cursor: pointer;
border: 1px solid transparent;
}
.app-item:hover {
background: var(--bg-hover);
border-color: var(--border-color);
transform: translateY(-2px);
}
.app-item.active {
background: var(--accent-light);
border-color: var(--accent-color);
}
.app-icon {
font-size: 28px;
filter: drop-shadow(0 2px 4px hsla(var(--foreground) / 0.1));
}
.app-item span {
font-size: 13px;
font-weight: 500;
color: var(--text-primary);
}
/* ============================================ */
/* USER AVATAR */
/* ============================================ */
.user-avatar {
width: 40px;
height: 40px;
border-radius: var(--radius-full);
background: var(--accent-gradient);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 700;
font-size: 16px;
cursor: pointer;
transition: all var(--transition-fast);
box-shadow: var(--shadow-sm);
}
.user-avatar:hover {
transform: scale(1.1);
box-shadow: var(--shadow-md);
}
/* ============================================ */
/* LOADING OVERLAY */
/* ============================================ */
.loading-overlay {
position: fixed;
inset: 0;
background: var(--primary-bg);
display: flex;
align-items: center;
justify-content: center;
z-index: var(--z-modal);
transition:
opacity var(--transition-smooth),
visibility var(--transition-smooth);
}
.loading-overlay.hidden {
opacity: 0;
visibility: hidden;
pointer-events: none;
}
.loading-spinner {
width: 48px;
height: 48px;
border: 4px solid var(--border-color);
border-top-color: var(--accent-color);
border-radius: var(--radius-full);
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* ============================================ */
/* CONNECTION STATUS */
/* ============================================ */
.connection-status {
position: fixed;
top: 72px;
left: 50%;
transform: translateX(-50%);
padding: 8px 16px;
border-radius: var(--radius-lg);
font-size: 13px;
font-weight: 500;
z-index: var(--z-fixed);
box-shadow: var(--shadow-lg);
transition: all var(--transition-smooth);
opacity: 0;
pointer-events: none;
}
.connection-status.disconnected {
background: var(--error-color);
color: white;
opacity: 1;
}
.connection-status.connecting {
background: var(--warning-color);
color: white;
opacity: 1;
}
.connection-status.connected {
background: var(--success-color);
color: white;
opacity: 0;
}
/* ============================================ */
/* SCROLLBAR STYLING */
/* ============================================ */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
background: var(--scrollbar-thumb-hover);
}
/* Firefox */
* {
scrollbar-width: thin;
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
/* ============================================ */
/* UTILITY CLASSES */
/* ============================================ */
.fade-in {
animation: fadeIn var(--transition-smooth) ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.slide-in {
animation: slideIn var(--transition-smooth) ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(-20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.glass-panel {
background: var(--glass-bg);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border: 1px solid var(--glass-border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
}
.button-primary {
background: var(--accent-color);
color: hsl(var(--primary-foreground));
border: none;
padding: 10px 20px;
border-radius: var(--radius-md);
font-weight: 600;
cursor: pointer;
transition: all var(--transition-fast);
}
.button-primary:hover {
background: var(--accent-hover);
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.button-secondary {
background: var(--secondary-bg);
color: var(--text-primary);
border: 1px solid var(--border-color);
padding: 10px 20px;
border-radius: var(--radius-md);
font-weight: 600;
cursor: pointer;
transition: all var(--transition-fast);
}
.button-secondary:hover {
background: var(--bg-hover);
border-color: var(--accent-color);
}
.card {
background: hsl(var(--card));
color: hsl(var(--card-foreground));
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: var(--space-lg);
box-shadow: var(--shadow-sm);
transition: all var(--transition-fast);
}
.card:hover {
box-shadow: var(--shadow-md);
border-color: var(--accent-color);
}
/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */
@media (max-width: 768px) {
.float-header {
padding: 0 var(--space-md);
}
.logo-text {
display: none;
}
.theme-dropdown {
padding: 8px 12px;
font-size: 13px;
}
.apps-dropdown {
right: var(--space-md);
width: calc(100vw - 32px);
max-width: 280px;
}
}
@media (max-width: 480px) {
.float-header {
height: 56px;
padding: 0 var(--space-sm);
}
:root {
--header-height: 56px;
}
.icon-button {
width: 36px;
height: 36px;
}
.user-avatar {
width: 36px;
height: 36px;
font-size: 14px;
}
.logo-icon {
width: 32px;
height: 32px;
}
}
/* ============================================ */
/* PRINT STYLES */
/* ============================================ */
@media print {
.float-header,
.loading-overlay,
.apps-dropdown,
.icon-button,
.theme-dropdown,
.user-avatar {
display: none !important;
}
body {
overflow: visible;
}
#main-content {
overflow: visible;
}
}
/* ============================================ */
/* ACCESSIBILITY */
/* ============================================ */
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
*:focus-visible {
outline: 2px solid var(--accent-color);
outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}