dashboard/app/static/css/style.css

285 lines
5.3 KiB
CSS

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');
/* Root and Variable Definitions */
:root {
--sidebar-width-collapsed: 60px;
--sidebar-width-expanded: 280px;
--max-container-width: 1200px;
--primary-color: #007BFF;
--primary-color-hover: #0066cc;
--light-grey: #F8F9FA;
--dark-grey: #343A40;
--white: #FFFFFF;
--box-shadow-color: rgba(0, 0, 0, 0.1);
--box-shadow-hover-color: rgba(0, 0, 0, 0.15);
}
/* Body and Global Styles */
body {
font-family: 'Inter', sans-serif;
margin: 0;
padding: 0;
background: var(--light-grey);
display: flex;
height: 100vh;
overflow: hidden;
}
/* Sidebar Styles */
.sidebar {
display: flex;
flex-direction: column;
background: var(--white);
width: var(--sidebar-width-collapsed);
height: 100%;
transition: width 0.3s ease;
box-shadow: 2px 0 5px var(--box-shadow-color);
overflow: hidden;
z-index: 20;
}
.sidebar:hover, .sidebar.sidebar-expanded {
width: var(--sidebar-width-expanded);
}
.menu-item {
display: flex;
align-items: center;
padding: 15px 20px;
color: var(--dark-grey);
font-size: 16px;
transition: background-color 0.3s, padding-left 0.3s;
cursor: pointer;
overflow: hidden;
}
.menu-item:hover {
background-color: var(--primary-color);
color: var(--white);
}
.menu-icon {
margin-right: 10px;
transition: transform 0.3s ease;
}
.sidebar:hover .menu-icon, .sidebar.sidebar-expanded .menu-icon {
transform: rotate(360deg);
}
.menu-label {
white-space: nowrap;
overflow: hidden;
transition: opacity 0.3s ease, width 0.3s ease;
display: none;
}
.sidebar:hover .menu-label, .sidebar.sidebar-expanded .menu-label {
display: inline;
}
@media (min-width: 1200px) {
.container {
max-width: var(--max-container-width);
margin: auto;
padding: 20px 40px;
}
.card-grid {
grid-template-columns: repeat(3, 1fr);
gap: 30px;
}
}
/* Responsive Design for Smaller Screens */
@media (max-width: 768px) {
.sidebar {
position: fixed;
width: var(--sidebar-width-collapsed);
}
.sidebar-expanded {
width: 200px;
}
.container {
margin-left: var(--sidebar-width-collapsed);
width: calc(100% - var(--sidebar-width-collapsed));
}
.sidebar-expanded + .container {
margin-left: 200px;
width: calc(100% - 200px);
}
.card-grid {
grid-template-columns: 1fr;
}
}
/* Main Content Styles */
.container {
margin-left: var(--sidebar-width-collapsed);
transition: margin-left 0.3s ease;
padding: 20px;
width: calc(100% - var(--sidebar-width-collapsed));
overflow-y: auto;
overflow-x: hidden;
}
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
padding: 20px;
}
.card {
background-color: var(--white);
border-radius: 8px;
box-shadow: 0 4px 8px var(--box-shadow-color);
overflow: hidden;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 20px;
cursor: pointer;
user-select: none;
}
.card:hover {
box-shadow: 0 6px 12px var(--box-shadow-hover-color);
transform: translateY(-5px);
}
.card-icon {
font-size: 40px;
color: var(--primary-color);
margin-bottom: 10px;
}
.card-content {
display: flex;
flex-direction: column;
}
.card-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 5px;
}
.card-description {
font-size: 14px;
color: var(--dark-grey);
}
.card-container {
padding: 20px;
display: flex;
flex-direction: column;
flex-grow: 1;
}
/* Table Styles */
.card table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
}
.card th, .card td {
border: 1px solid #ddd;
padding: 8px;
word-wrap: break-word;
}
/* 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: var(--primary-color);
color: var(--white);
border: none;
cursor: pointer;
transition: background-color 0.3s;
}
.button:hover {
background-color: var(--primary-color-hover);
}
.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);
}
.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 {
background: #fff;
padding: 20px;
}
.tab-pane {
display: none;
}
.tab-pane.active {
display: block;
}