Files
2026-09-11 22:42:45 -04:00

724 lines
12 KiB
CSS

/**
* Users Page Dedicated CSS
* static/css/users-page.css
*
* This file contains all necessary styles for the users management page
* ensuring it works independently of other CSS files.
*/
/* Users Page Container */
.users-page {
max-width: 1600px;
margin: 0 auto;
padding: 2rem;
min-height: 100vh;
background: #f8fafc;
}
/* Page Header */
.users-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 2rem;
padding: 1.5rem;
background: #ffffff;
border-radius: 0.75rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
position: relative;
overflow: hidden;
}
.users-header::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #059669, #047857);
}
.header-content h1 {
font-size: 1.875rem;
font-weight: 700;
color: #0f172a;
margin-bottom: 0.5rem;
display: flex;
align-items: center;
gap: 0.75rem;
}
.header-content h1 i {
color: #059669;
}
.header-content p {
color: #64748b;
font-size: 1.125rem;
margin: 0;
}
.header-actions {
display: flex;
gap: 0.75rem;
}
/* User Statistics Grid */
.user-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stat-card {
background: #ffffff;
padding: 1.5rem;
border-radius: 0.75rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
display: flex;
align-items: center;
gap: 1rem;
transition: all 0.2s ease-in-out;
border: 1px solid #e2e8f0;
position: relative;
overflow: hidden;
}
.stat-card::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
}
.stat-card.admin::before {
background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.stat-card.staff::before {
background: linear-gradient(90deg, #64748b, #475569);
}
.stat-card.payroll::before {
background: linear-gradient(90deg, #17a2b8, #138496);
}
.stat-card.accounting::before {
background: linear-gradient(90deg, #059669, #047857);
}
.stat-card.project-manager::before {
background: linear-gradient(90deg, #6f42c1, #5a2d91);
}
.stat-card.active::before {
background: linear-gradient(90deg, #10b981, #047857);
}
.stat-card.inactive::before {
background: linear-gradient(90deg, #ef4444, #b91c1c);
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.stat-icon {
width: 50px;
height: 50px;
border-radius: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.25rem;
color: #ffffff;
flex-shrink: 0;
}
.stat-icon.admin {
background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
.stat-icon.staff {
background: linear-gradient(135deg, #64748b, #475569);
}
.stat-icon.payroll {
background: linear-gradient(135deg, #17a2b8, #138496);
}
.stat-icon.accounting {
background: linear-gradient(135deg, #059669, #047857);
}
.stat-icon.project-manager {
background: linear-gradient(135deg, #6f42c1, #5a2d91);
}
.stat-icon.active {
background: linear-gradient(135deg, #10b981, #047857);
}
.stat-icon.inactive {
background: linear-gradient(135deg, #ef4444, #b91c1c);
}
.stat-info h3 {
font-size: 1.75rem;
font-weight: 700;
color: #0f172a;
margin-bottom: 0.25rem;
margin-top: 0;
}
.stat-info p {
color: #64748b;
font-size: 0.875rem;
margin: 0;
}
/* Users Controls */
.users-controls {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
padding: 1.5rem;
background: #ffffff;
border-radius: 0.75rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
flex-wrap: wrap;
gap: 1rem;
}
.search-filters {
display: flex;
gap: 1rem;
align-items: center;
flex-wrap: wrap;
}
.search-box {
position: relative;
display: flex;
align-items: center;
}
.search-box i {
position: absolute;
left: 0.75rem;
color: #94a3b8;
z-index: 1;
}
.search-box input {
padding: 0.75rem 0.75rem 0.75rem 2.5rem;
border: 2px solid #e2e8f0;
border-radius: 0.5rem;
font-size: 0.875rem;
width: 300px;
transition: all 0.2s ease-in-out;
background: #ffffff;
}
.search-box input:focus {
outline: none;
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.filter-group {
display: flex;
gap: 0.75rem;
flex-wrap: wrap;
}
.filter-select {
padding: 0.75rem 1rem;
border: 2px solid #e2e8f0;
border-radius: 0.5rem;
font-size: 0.875rem;
background-color: #ffffff;
cursor: pointer;
transition: all 0.2s ease-in-out;
min-width: 140px;
}
.filter-select:focus {
outline: none;
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.view-options {
display: flex;
gap: 0.75rem;
}
/* Users Table Container */
.users-table-container {
background: #ffffff;
border-radius: 0.75rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
overflow: hidden;
}
.users-table {
width: 100%;
border-collapse: collapse;
}
.users-table th {
background-color: #f8fafc;
padding: 1rem;
text-align: left;
font-weight: 600;
color: #334155;
font-size: 0.875rem;
border-bottom: 1px solid #e2e8f0;
position: sticky;
top: 0;
z-index: 10;
}
.users-table th:first-child {
width: 50px;
text-align: center;
}
.users-table td {
padding: 1rem;
border-bottom: 1px solid #f1f5f9;
vertical-align: middle;
}
.users-table tr.user-row {
transition: all 0.2s ease-in-out;
cursor: pointer;
}
.users-table tr.user-row:hover {
background-color: #f8fafc;
}
.users-table tr.user-row:last-child td {
border-bottom: none;
}
/* User Information */
.user-info {
display: flex;
align-items: center;
gap: 0.75rem;
}
.user-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background: linear-gradient(135deg, #2563eb, #1d4ed8);
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 0.875rem;
flex-shrink: 0;
}
.user-details h4 {
font-size: 0.875rem;
font-weight: 600;
color: #0f172a;
margin: 0 0 0.25rem 0;
}
.user-details p {
font-size: 0.75rem;
color: #64748b;
margin: 0;
}
/* Contact Information */
.user-contact {
font-size: 0.875rem;
}
.contact-email {
display: flex;
align-items: center;
gap: 0.5rem;
color: #334155;
}
.contact-email i {
color: #64748b;
font-size: 0.75rem;
}
/* Role Badges */
.user-role {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.025em;
}
.user-role.admin {
background-color: rgba(251, 191, 36, 0.1);
color: #d97706;
border: 1px solid rgba(251, 191, 36, 0.3);
}
.user-role.staff {
background-color: rgba(100, 116, 139, 0.1);
color: #64748b;
border: 1px solid rgba(100, 116, 139, 0.3);
}
.user-role.payroll {
background-color: rgba(23, 162, 184, 0.1);
color: #138496;
border: 1px solid rgba(23, 162, 184, 0.3);
}
.user-role.accounting {
background-color: rgba(5, 150, 105, 0.1);
color: #047857;
border: 1px solid rgba(5, 150, 105, 0.3);
}
.user-role.project_manager {
background-color: rgba(111, 66, 193, 0.1);
color: #5a2d91;
border: 1px solid rgba(111, 66, 193, 0.3);
}
/* Status Badges */
.user-status {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
font-size: 0.75rem;
font-weight: 600;
}
.user-status.active {
background-color: rgba(5, 150, 105, 0.1);
color: #10b981;
border: 1px solid rgba(5, 150, 105, 0.2);
}
.user-status.inactive {
background-color: rgba(220, 38, 38, 0.1);
color: #ef4444;
border: 1px solid rgba(220, 38, 38, 0.2);
}
/* QR Code Count */
.user-qr-count {
text-align: center;
}
.qr-stats {
display: flex;
flex-direction: column;
align-items: center;
}
.qr-count {
font-size: 1.25rem;
font-weight: 700;
color: #2563eb;
}
.qr-stats small {
font-size: 0.75rem;
color: #64748b;
margin-top: 0.25rem;
}
/* Date Information */
.date-info {
display: flex;
flex-direction: column;
font-size: 0.875rem;
}
.date-main {
font-weight: 500;
color: #0f172a;
}
.date-time {
font-size: 0.75rem;
color: #64748b;
margin-top: 0.125rem;
}
.never-logged-in {
color: #94a3b8;
font-style: italic;
font-size: 0.875rem;
}
/* Action Buttons */
.user-actions {
display: flex;
justify-content: center;
}
.action-buttons {
display: flex;
gap: 0.5rem;
align-items: center;
}
/* Button Styles */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
border: 1px solid transparent;
border-radius: 0.375rem;
font-size: 0.875rem;
font-weight: 500;
text-decoration: none;
cursor: pointer;
transition: all 0.2s ease-in-out;
white-space: nowrap;
}
.btn:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}
.btn-sm {
padding: 0.375rem 0.75rem;
font-size: 0.75rem;
}
.btn-primary {
background-color: #2563eb;
color: #ffffff;
border-color: #2563eb;
}
.btn-primary:hover {
background-color: #1d4ed8;
border-color: #1d4ed8;
text-decoration: none;
color: #ffffff;
}
.btn-secondary {
background-color: #64748b;
color: #ffffff;
border-color: #64748b;
}
.btn-secondary:hover {
background-color: #475569;
border-color: #475569;
text-decoration: none;
color: #ffffff;
}
.btn-success {
background-color: #10b981;
color: #ffffff;
border-color: #10b981;
}
.btn-success:hover {
background-color: #047857;
border-color: #047857;
text-decoration: none;
color: #ffffff;
}
.btn-warning {
background-color: #f59e0b;
color: #ffffff;
border-color: #f59e0b;
}
.btn-warning:hover {
background-color: #d97706;
border-color: #d97706;
text-decoration: none;
color: #ffffff;
}
.btn-danger {
background-color: #ef4444;
color: #ffffff;
border-color: #ef4444;
}
.btn-danger:hover {
background-color: #dc2626;
border-color: #dc2626;
text-decoration: none;
color: #ffffff;
}
.btn:disabled,
.btn[disabled] {
opacity: 0.5;
cursor: not-allowed;
}
.btn:disabled:hover,
.btn[disabled]:hover {
transform: none;
}
/* No Users Message */
.no-users-message {
display: flex;
justify-content: center;
align-items: center;
padding: 3rem;
background: #ffffff;
border-radius: 0.75rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
.no-users-content {
text-align: center;
max-width: 400px;
}
.no-users-content i {
font-size: 3rem;
color: #94a3b8;
margin-bottom: 1rem;
}
.no-users-content h3 {
font-size: 1.25rem;
color: #334155;
margin-bottom: 0.75rem;
}
.no-users-content p {
color: #64748b;
margin-bottom: 1.5rem;
}
/* Responsive Design */
@media (max-width: 1024px) {
.users-page {
padding: 1rem;
}
.user-stats {
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 1rem;
}
.search-box input {
width: 250px;
}
}
@media (max-width: 768px) {
.users-header {
flex-direction: column;
gap: 1rem;
text-align: center;
}
.user-stats {
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
.users-controls {
flex-direction: column;
align-items: stretch;
gap: 1rem;
}
.search-filters {
justify-content: center;
flex-wrap: wrap;
}
.search-box input {
width: 100%;
max-width: 300px;
}
.filter-group {
justify-content: center;
}
/* Hide less important columns on mobile */
.users-table th:nth-child(6),
.users-table td:nth-child(6),
.users-table th:nth-child(7),
.users-table td:nth-child(7),
.users-table th:nth-child(8),
.users-table td:nth-child(8) {
display: none;
}
}
@media (max-width: 480px) {
.user-stats {
grid-template-columns: 1fr;
}
.users-table {
font-size: 0.75rem;
}
.users-table th,
.users-table td {
padding: 0.5rem;
}
.user-avatar {
width: 32px;
height: 32px;
font-size: 0.75rem;
}
.user-details h4 {
font-size: 0.75rem;
}
.user-details p {
font-size: 0.625rem;
}
/* Hide more columns on very small screens */
.users-table th:nth-child(5),
.users-table td:nth-child(5) {
display: none;
}
.action-buttons {
flex-direction: column;
gap: 0.25rem;
}
}