Files
GOV_QR_Codes_Management/static/css/time_attendance.css
T

1037 lines
17 KiB
CSS

/**
* Time Attendance Page Styles
* static/css/time_attendance.css
*/
/* Main Container */
.time-attendance-page {
max-width: 1600px;
margin: 0 auto;
padding: 2rem;
min-height: 100vh;
background: #f8fafc;
}
/* Sidebar Layout Compatibility */
body.has-sidebar .time-attendance-page {
margin-left: 0;
padding-left: 0;
}
.main-wrapper .time-attendance-page {
padding: 2rem;
max-width: 1600px;
margin: 0 auto;
min-height: 100vh;
background: #f8fafc;
}
/* Page Header */
.time-attendance-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);
position: relative;
overflow: hidden;
}
.time-attendance-header::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}
.header-navigation {
margin-bottom: 1rem;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: #f1f5f9;
color: #475569;
text-decoration: none;
border-radius: 0.5rem;
font-size: 0.875rem;
font-weight: 500;
border: 1px solid #cbd5e1;
transition: all 0.2s ease-in-out;
}
.back-button:hover {
background: #e2e8f0;
color: #334155;
transform: translateX(-2px);
text-decoration: none;
}
.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: #8b5cf6;
}
.header-description {
color: #64748b;
font-size: 1rem;
margin: 0;
}
.header-actions {
display: flex;
gap: 1rem;
}
/* Statistics Grid */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 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);
display: flex;
align-items: center;
gap: 1rem;
transition: all 0.2s ease-in-out;
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px 0 rgba(0, 0, 0, 0.1);
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 0.75rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: #ffffff;
flex-shrink: 0;
}
.stat-icon.records {
background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.stat-icon.employees {
background: linear-gradient(135deg, #10b981, #059669);
}
.stat-icon.locations {
background: linear-gradient(135deg, #f59e0b, #d97706);
}
.stat-icon.imports {
background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.stat-info h3 {
font-size: 2rem;
font-weight: 700;
color: #0f172a;
margin: 0;
}
.stat-info p {
color: #64748b;
font-size: 0.875rem;
margin: 0;
font-weight: 500;
}
/* Import Section */
.import-section {
background: #ffffff;
border-radius: 0.75rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
margin-bottom: 2rem;
overflow: hidden;
}
.import-header {
background: #f8fafc;
padding: 1.5rem;
border-bottom: 1px solid #e2e8f0;
position: relative;
}
.import-header::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, #3b82f6, #2563eb);
}
.import-header h2 {
display: flex;
align-items: center;
gap: 0.75rem;
font-size: 1.25rem;
font-weight: 600;
color: #0f172a;
margin: 0;
}
.import-header h2 i {
color: #3b82f6;
}
.import-body {
padding: 2rem;
}
/* File Upload Area */
.file-upload-area {
border: 2px dashed #cbd5e1;
border-radius: 0.75rem;
padding: 3rem 2rem;
text-align: center;
background: #f8fafc;
transition: all 0.2s ease-in-out;
cursor: pointer;
position: relative;
}
.file-upload-area:hover {
border-color: #8b5cf6;
background: #faf5ff;
}
.file-upload-area.dragover {
border-color: #8b5cf6;
background: #faf5ff;
transform: scale(1.02);
}
.upload-icon {
width: 80px;
height: 80px;
margin: 0 auto 1rem;
background: linear-gradient(135deg, #8b5cf6, #7c3aed);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: 2rem;
}
.upload-text h3 {
font-size: 1.25rem;
font-weight: 600;
color: #0f172a;
margin-bottom: 0.5rem;
}
.upload-text p {
color: #64748b;
font-size: 0.875rem;
margin-bottom: 1.5rem;
}
.file-input {
display: none;
}
/* Form Styles */
.form-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
display: block;
font-weight: 600;
color: #374151;
margin-bottom: 0.5rem;
font-size: 0.875rem;
}
.form-label.required::after {
content: " *";
color: #dc2626;
}
.form-input {
width: 100%;
padding: 0.75rem 1rem;
border: 2px solid #e2e8f0;
border-radius: 0.5rem;
font-size: 1rem;
transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
background: #ffffff;
}
.form-input:focus {
outline: none;
border-color: #8b5cf6;
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.form-select {
width: 100%;
padding: 0.75rem 1rem;
border: 2px solid #e2e8f0;
border-radius: 0.5rem;
font-size: 1rem;
background: #ffffff;
transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.form-select:focus {
outline: none;
border-color: #8b5cf6;
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
/* Filter Section */
.filter-section {
background: #ffffff;
border-radius: 0.75rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
margin-bottom: 2rem;
overflow: hidden;
}
.filter-header {
background: #f8fafc;
padding: 1rem 1.5rem;
border-bottom: 1px solid #e2e8f0;
display: flex;
justify-content: between;
align-items: center;
}
.filter-header h3 {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 1rem;
font-weight: 600;
color: #0f172a;
margin: 0;
}
.filter-toggle {
background: none;
border: none;
color: #64748b;
cursor: pointer;
font-size: 1rem;
transition: color 0.2s ease-in-out;
}
.filter-toggle:hover {
color: #0f172a;
}
.filter-body {
padding: 1.5rem;
}
.filter-form {
display: grid;
grid-template-columns: repeat(5, 1fr); /* 5 equal columns */
gap: 1rem;
align-items: end;
}
.form-group {
display: flex;
flex-direction: column;
min-width: 0; /* Allow shrinking */
}
.form-input,
.form-select {
width: 100%; /* Full width of parent */
padding: 0.625rem 0.875rem;
font-size: 0.875rem;
box-sizing: border-box;
}
/* Make buttons span full width */
.form-actions {
grid-column: 1 / -1; /* Span all columns */
display: flex;
gap: 0.75rem;
margin-top: 0.5rem;
}
/* Responsive */
@media (max-width: 1200px) {
.filter-form {
grid-template-columns: repeat(3, 1fr); /* 2 columns on medium screens */
}
}
@media (max-width: 768px) {
.filter-form {
grid-template-columns: 1fr; /* 1 column on mobile */
}
.form-actions {
flex-direction: column;
}
}
/* Records Table */
.records-section {
background: #ffffff;
border-radius: 0.75rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.records-header {
background: #f8fafc;
padding: 1.5rem;
border-bottom: 1px solid #e2e8f0;
display: flex;
justify-content: space-between;
align-items: center;
}
.records-header h2 {
display: flex;
align-items: center;
gap: 0.75rem;
font-size: 1.25rem;
font-weight: 600;
color: #0f172a;
margin: 0;
}
.records-header h2 i {
color: #8b5cf6;
}
.records-meta {
color: #64748b;
font-size: 0.875rem;
}
.records-table {
width: 100%;
border-collapse: collapse;
}
.records-table th {
background: #f8fafc;
padding: 1rem;
text-align: left;
font-weight: 600;
color: #374151;
font-size: 0.875rem;
border-bottom: 1px solid #e2e8f0;
}
.records-table td {
padding: 1rem;
border-bottom: 1px solid #f1f5f9;
font-size: 0.875rem;
}
.records-table tr:hover {
background: #f8fafc;
}
.employee-cell {
display: flex;
align-items: center;
gap: 0.75rem;
}
.employee-avatar {
width: 32px;
height: 32px;
background: linear-gradient(135deg, #8b5cf6, #7c3aed);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: 0.75rem;
font-weight: 600;
flex-shrink: 0;
}
.employee-info {
flex: 1;
}
.employee-name {
font-weight: 600;
color: #0f172a;
margin-bottom: 0.125rem;
}
.employee-id {
color: #64748b;
font-size: 0.75rem;
}
.action-badge {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.75rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 500;
}
.action-badge.check-in {
background: #dcfce7;
color: #166534;
}
.action-badge.check-out {
background: #fef3c7;
color: #92400e;
}
.action-badge.break {
background: #dbeafe;
color: #1e40af;
}
.datetime-cell {
color: #374151;
font-family: monospace;
font-size: 0.8125rem;
}
.location-cell {
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.platform-cell {
color: #64748b;
font-size: 0.8125rem;
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.actions-cell {
text-align: right;
}
.action-btn {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.5rem;
border: none;
border-radius: 0.375rem;
font-size: 0.75rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease-in-out;
}
.action-btn.view {
background: #e0e7ff;
color: #3730a3;
}
.action-btn.view:hover {
background: #c7d2fe;
}
.action-btn.delete {
background: #fee2e2;
color: #991b1b;
}
.action-btn.delete:hover {
background: #fecaca;
}
/* Enhanced action buttons */
.action-btn.btn-info {
background: #4299e1;
color: white;
}
.action-btn.btn-info:hover {
background: #3182ce;
}
.action-btn.btn-delete {
background: #f56565;
color: white;
}
.action-btn.btn-delete:hover {
background: #e53e3e;
}
/* Progress indicator animation */
@keyframes spin {
to { transform: rotate(360deg); }
}
.spinner {
animation: spin 0.8s linear infinite;
}
/* Pagination */
.pagination-section {
padding: 1.5rem;
background: #f8fafc;
border-top: 1px solid #e2e8f0;
display: flex;
justify-content: between;
align-items: center;
}
.pagination-info {
color: #64748b;
font-size: 0.875rem;
}
.pagination-controls {
display: flex;
gap: 0.5rem;
}
.pagination-btn {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.5rem 0.75rem;
border: 1px solid #e2e8f0;
border-radius: 0.375rem;
background: #ffffff;
color: #374151;
font-size: 0.875rem;
text-decoration: none;
transition: all 0.2s ease-in-out;
}
.pagination-btn:hover:not(.disabled) {
background: #f8fafc;
border-color: #cbd5e1;
text-decoration: none;
}
.pagination-btn.active {
background: #8b5cf6;
border-color: #8b5cf6;
color: #ffffff;
}
.pagination-btn.disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Empty State */
.empty-state {
text-align: center;
padding: 4rem 2rem;
}
.empty-icon {
width: 120px;
height: 120px;
margin: 0 auto 1.5rem;
background: #f1f5f9;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #64748b;
font-size: 3rem;
}
.empty-state h3 {
font-size: 1.5rem;
font-weight: 600;
color: #0f172a;
margin-bottom: 0.5rem;
}
.empty-state p {
color: #64748b;
font-size: 1rem;
margin-bottom: 2rem;
max-width: 400px;
margin-left: auto;
margin-right: auto;
}
/* Import Results */
.import-results {
background: #ffffff;
border-radius: 0.75rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.import-results.success {
border-left: 4px solid #10b981;
}
.import-results.error {
border-left: 4px solid #ef4444;
}
.import-results.warning {
border-left: 4px solid #f59e0b;
}
.results-header {
padding: 1.5rem;
background: #f8fafc;
border-bottom: 1px solid #e2e8f0;
}
.results-header h2 {
display: flex;
align-items: center;
gap: 0.75rem;
font-size: 1.25rem;
font-weight: 600;
margin: 0;
}
.results-body {
padding: 2rem;
}
.results-summary {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin-bottom: 2rem;
}
.summary-item {
text-align: center;
padding: 1rem;
border-radius: 0.5rem;
background: #f8fafc;
}
.summary-item.success {
background: #dcfce7;
}
.summary-item.error {
background: #fee2e2;
}
.summary-item .number {
font-size: 2rem;
font-weight: 700;
margin-bottom: 0.25rem;
}
.summary-item.success .number {
color: #166534;
}
.summary-item.error .number {
color: #991b1b;
}
.summary-item .label {
color: #64748b;
font-size: 0.875rem;
font-weight: 500;
}
.error-list {
background: #fef2f2;
border: 1px solid #fecaca;
border-radius: 0.5rem;
padding: 1rem;
}
.error-list h4 {
color: #991b1b;
font-size: 1rem;
font-weight: 600;
margin-bottom: 0.75rem;
}
.error-list ul {
list-style: none;
padding: 0;
margin: 0;
}
.error-list li {
color: #dc2626;
font-size: 0.875rem;
padding: 0.25rem 0;
border-bottom: 1px solid #fecaca;
}
.error-list li:last-child {
border-bottom: none;
}
/* Button Styles */
.btn {
padding: 0.75rem 1.25rem;
font-size: 0.875rem;
line-height: 1.25rem; /* Fixed line height */
height: 2.75rem; /* Fixed height: 44px */
border-radius: 0.5rem;
border: none;
font-weight: 600;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
transition: all 0.2s ease-in-out;
text-decoration: none;
white-space: nowrap;
box-sizing: border-box; /* CRITICAL */
}
.btn-primary {
background: linear-gradient(135deg, #8b5cf6, #7c3aed);
color: #ffffff;
border: 2px solid transparent;
}
.btn-primary:hover {
background: #7c3aed;
transform: translateY(-1px);
text-decoration: none;
color: #ffffff;
}
.btn-secondary {
background: #64748b;
color: #ffffff;
border: 2px solid transparent;
}
.btn-secondary:hover {
background: #475569;
transform: translateY(-1px);
text-decoration: none;
color: #ffffff;
}
.btn-success {
background: #10b981;
color: #ffffff;
}
.btn-success:hover {
background: #059669;
transform: translateY(-1px);
text-decoration: none;
color: #ffffff;
}
.btn-warning {
background: #f59e0b;
color: #ffffff;
}
.btn-warning:hover {
background: #d97706;
transform: translateY(-1px);
text-decoration: none;
color: #ffffff;
}
.btn-danger {
background: #ef4444;
color: #ffffff;
}
.btn-danger:hover {
background: #dc2626;
transform: translateY(-1px);
text-decoration: none;
color: #ffffff;
}
.btn-outline {
background: #ffffff;
border: 2px solid #e2e8f0;
color: #374151;
}
.btn-outline:hover {
background: #f8fafc;
border-color: #cbd5e1;
text-decoration: none;
}
.btn-sm {
padding: 0.5rem 1rem;
font-size: 0.8125rem;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
/* Responsive Design */
@media (max-width: 1024px) {
.stats-grid {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.form-grid {
grid-template-columns: 1fr;
}
.filter-form {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.time-attendance-page {
padding: 1rem;
}
.time-attendance-header {
flex-direction: column;
align-items: stretch;
gap: 1rem;
text-align: center;
}
.header-navigation {
text-align: left;
margin-bottom: 0.5rem;
}
.header-actions {
justify-content: center;
}
.stats-grid {
grid-template-columns: 1fr;
}
.records-table {
font-size: 0.75rem;
}
.records-table th,
.records-table td {
padding: 0.75rem 0.5rem;
}
.employee-cell {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
}
.pagination-section {
flex-direction: column;
gap: 1rem;
text-align: center;
}
}
@media (max-width: 480px) {
.time-attendance-page {
padding: 0.75rem;
}
.time-attendance-header {
padding: 1rem;
}
.header-content h1 {
font-size: 1.5rem;
}
.stat-card {
padding: 1rem;
}
.stat-icon {
width: 48px;
height: 48px;
font-size: 1.25rem;
}
.stat-info h3 {
font-size: 1.5rem;
}
.import-body,
.results-body {
padding: 1rem;
}
.file-upload-area {
padding: 2rem 1rem;
}
.upload-icon {
width: 60px;
height: 60px;
font-size: 1.5rem;
}
}
.btn,
button.btn,
a.btn {
height: 2.75rem !important;
min-height: 2.75rem !important;
max-height: 2.75rem !important;
line-height: 1.25rem !important;
box-sizing: border-box !important;
}