dashboard/app/static/css/style.css
2024-01-29 00:59:26 +01:00

217 lines
4.1 KiB
CSS

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
/* Body and Global Styles */
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
background: #F8F9FA;
display: flex;
height: 100vh;
overflow: hidden;
}
/* Sidebar Styles */
.sidebar {
display: flex;
flex-direction: column;
background: #FFFFFF;
width: 60px; /* Collapsed width */
height: 100%;
transition: width 0.3s ease; /* Smooth transition for expanding */
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
overflow: hidden;
z-index: 20;
}
.sidebar:hover, .sidebar.sidebar-expanded {
width: 280px;
}
.menu-item {
display: flex;
align-items: center;
padding: 15px 20px;
color: #343A40;
font-size: 16px;
transition: background-color 0.3s, padding-left 0.3s;
cursor: pointer;
overflow: hidden; /* Hide overflow when sidebar is collapsed */
}
.menu-item:hover {
background-color: #007BFF;
color: #FFFFFF;
}
.menu-icon {
margin-right: 10px;
transition: transform 0.3s ease; /* Smooth icon transition */
}
.sidebar:hover .menu-icon, .sidebar.sidebar-expanded .menu-icon {
transform: rotate(360deg); /* Rotate icon on hover */
}
.menu-label {
white-space: nowrap;
overflow: hidden;
transition: opacity 0.3s ease, width 0.3s ease;
display: none; /* Hide labels initially */
}
.sidebar:hover .menu-label, .sidebar.sidebar-expanded .menu-label {
display: inline; /* Show labels when sidebar is expanded */
}
/* Adjust sidebar for touch devices (no hover) */
@media (hover: none) {
.sidebar:hover .menu-label {
display: none;
}
}
/* Responsive Design */
@media (max-width: 768px) {
.sidebar {
position: fixed;
width: 60px;
}
.sidebar-expanded {
width: 200px;
}
.container {
margin-left: 60px;
width: calc(100% - 60px);
}
.sidebar-expanded + .container {
margin-left: 200px;
width: calc(100% - 200px);
}
}
/* Main Content Styles */
.container {
margin-left: 60px;
transition: margin-left 0.3s ease;
padding: 20px;
width: calc(100% - 60px);
overflow-y: auto;
}
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 20px;
}
.card {
background-color: white;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 10px;
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.card-container {
padding: 20px;
}
/* Form and Button Styles */
input, .button {
padding: 12px;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 5px;
width: calc(100% - 24px);
}
.button {
background-color: #007BFF;
color: white;
border: none;
cursor: pointer;
transition: background-color 0.3s;
}
.button:hover {
background-color: #003875;
}
/* Login Overlay Styles */
.login-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 2000;
}
.login-window {
background-color: #fff;
padding: 40px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
/* Tabbed Interface Styles */
.tab-group {
list-style: none;
padding: 0;
margin: 0;
display: flex;
border-bottom: 2px solid #ccc;
}
.tab-group li {
flex: 1;
text-align: center;
margin-bottom: -1px;
}
.tab-group li a {
display: block;
padding: 15px;
background: #eee;
color: #333;
text-decoration: none;
transition: background-color 0.3s, color 0.3s;
}
.tab-group li a:hover {
background-color: #ddd;
}
.tab-group .active a {
background: #fff;
border-bottom: 2px solid white;
}
/* Tab Content */
.tab-content {
background: #fff;
padding: 20px;
}
.tab-pane {
display: none;
}
.tab-pane.active {
display: block;
}