Files

642 lines
16 KiB
CSS

/**
* Attendance Fullscreen CSS
* Optimized for iPad and tablet viewing
* static/css/attendance_fullscreen.css
*/
/* ===========================
FULLSCREEN TOGGLE BUTTON
=========================== */
.fullscreen-toggle-btn {
position: fixed;
top: 20px;
right: 20px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, #2563eb, #1d4ed8);
color: white;
border: none;
border-radius: 12px;
cursor: pointer;
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.25rem;
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.fullscreen-toggle-btn:hover {
background: linear-gradient(135deg, #1d4ed8, #1e40af);
transform: scale(1.05);
box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}
.fullscreen-toggle-btn:active {
transform: scale(0.95);
}
/* ===========================
FULLSCREEN MODE BASE
=========================== */
.fullscreen-mode {
position: fixed !important;
top: 0 !important;
left: 0 !important;
width: 100vw !important;
height: 100vh !important;
max-width: 100vw !important;
margin: 0 !important;
background: #f8fafc !important;
z-index: 9998 !important;
overflow: auto !important;
padding: 20px !important;
box-sizing: border-box !important;
}
/* ===========================
HIDE UI ELEMENTS IN FULLSCREEN
=========================== */
/* Hide sidebar and overlays */
.fullscreen-mode ~ #sidebar,
.fullscreen-mode ~ .sidebar-overlay,
body.fullscreen-active #sidebar,
body.fullscreen-active .sidebar-overlay {
display: none !important;
}
/* Adjust main wrapper */
body.fullscreen-active .main-wrapper {
margin-left: 0 !important;
width: 100% !important;
}
/* Hide header completely */
.fullscreen-mode .attendance-header,
.fullscreen-mode > .attendance-header {
display: none !important;
visibility: hidden !important;
height: 0 !important;
overflow: hidden !important;
margin: 0 !important;
padding: 0 !important;
}
/* Hide ALL stats sections with various possible class names */
.fullscreen-mode .stats-section,
.fullscreen-mode > .stats-section,
.fullscreen-mode .stats-overview,
.fullscreen-mode > .stats-overview,
.fullscreen-mode .statistics-section,
.fullscreen-mode > .statistics-section,
.fullscreen-mode [class*="stat"][class*="section"],
.fullscreen-mode div[class*="stat-"] {
display: none !important;
visibility: hidden !important;
height: 0 !important;
overflow: hidden !important;
margin: 0 !important;
padding: 0 !important;
}
/* Exception: Keep stat cards inside table section visible */
.fullscreen-mode .attendance-table-section .stat-card,
.fullscreen-mode .table-section .stat-card {
display: flex !important;
visibility: visible !important;
height: auto !important;
}
/* ===========================
COMPACT FILTERS IN FULLSCREEN
=========================== */
.fullscreen-mode .filters-section {
margin-bottom: 1rem !important;
margin-top: 0 !important;
}
.fullscreen-mode .filters-card {
border-radius: 8px !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}
.fullscreen-mode .filters-header {
padding: 0.75rem 1.5rem !important;
background: #f8fafc !important;
border-bottom: 1px solid #e2e8f0 !important;
}
.fullscreen-mode .filters-header h3 {
font-size: 1rem !important;
font-weight: 600 !important;
margin: 0 !important;
}
.fullscreen-mode .filters-form {
padding: 1rem 1.5rem !important;
}
.fullscreen-mode .filter-row {
display: grid !important;
grid-template-columns: repeat(5, 1fr) !important;
gap: 0.75rem !important;
align-items: end !important;
margin-bottom: 0 !important;
}
.fullscreen-mode .filter-group {
display: flex !important;
flex-direction: column !important;
gap: 0.25rem !important;
min-width: 0 !important;
}
.fullscreen-mode .filter-group label {
font-size: 0.75rem !important;
margin-bottom: 0.25rem !important;
font-weight: 600 !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
color: #374151 !important;
}
.fullscreen-mode .filter-group input,
.fullscreen-mode .filter-group select {
padding: 0.5rem 0.75rem !important;
font-size: 0.875rem !important;
height: 38px !important;
border: 2px solid #e2e8f0 !important;
border-radius: 6px !important;
width: 100% !important;
box-sizing: border-box !important;
background: white !important;
}
.fullscreen-mode .filter-group input:focus,
.fullscreen-mode .filter-group select:focus {
border-color: #2563eb !important;
outline: none !important;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}
.fullscreen-mode .filter-actions {
grid-column: 1 / -1 !important;
display: flex !important;
gap: 0.75rem !important;
justify-content: flex-start !important;
margin-top: 0.5rem !important;
}
.fullscreen-mode .filter-actions .btn {
padding: 0.5rem 1rem !important;
font-size: 0.875rem !important;
height: 38px !important;
display: inline-flex !important;
align-items: center !important;
gap: 0.5rem !important;
}
/* ===========================
TABLE SECTION IN FULLSCREEN
=========================== */
.fullscreen-mode .attendance-table-section {
margin-bottom: 0 !important;
margin-top: 0 !important;
background: white !important;
border-radius: 8px !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
overflow: hidden !important;
}
.fullscreen-mode .table-header {
padding: 0.75rem 1.5rem !important;
background: #f8fafc !important;
border-bottom: 1px solid #e2e8f0 !important;
display: flex !important;
justify-content: space-between !important;
align-items: center !important;
}
.fullscreen-mode .table-header h3 {
font-size: 1rem !important;
font-weight: 600 !important;
margin: 0 !important;
}
.fullscreen-mode .table-controls {
display: flex !important;
align-items: center !important;
gap: 0.5rem !important;
}
.fullscreen-mode .table-container {
max-height: calc(100vh - 280px) !important;
overflow-y: auto !important;
overflow-x: auto !important;
}
.fullscreen-mode .attendance-table {
font-size: 0.8125rem !important;
width: 100% !important;
}
.fullscreen-mode .attendance-table th,
.fullscreen-mode .attendance-table td {
padding: 0.625rem 0.5rem !important;
white-space: nowrap !important;
}
.fullscreen-mode .attendance-table th {
position: sticky !important;
top: 0 !important;
background: #f8fafc !important;
z-index: 10 !important;
font-size: 0.75rem !important;
font-weight: 600 !important;
text-transform: uppercase !important;
letter-spacing: 0.025em !important;
}
/* ===========================
TABLE COLUMN OPTIMIZATION
=========================== */
/* Prevent text overlap - allow wrapping for long content */
.fullscreen-mode .attendance-table td {
white-space: normal !important;
word-wrap: break-word !important;
word-break: break-word !important;
max-width: 200px !important;
overflow: hidden !important;
}
/* Keep headers on single line */
.fullscreen-mode .attendance-table th {
white-space: nowrap !important;
}
/* Specific column width optimizations */
.fullscreen-mode .attendance-table th:nth-child(1),
.fullscreen-mode .attendance-table td:nth-child(1) {
/* # column */
width: 40px !important;
min-width: 40px !important;
max-width: 40px !important;
white-space: nowrap !important;
}
.fullscreen-mode .attendance-table th:nth-child(2),
.fullscreen-mode .attendance-table td:nth-child(2) {
/* Employee ID */
width: 80px !important;
min-width: 80px !important;
max-width: 80px !important;
white-space: nowrap !important;
}
.fullscreen-mode .attendance-table th:nth-child(3),
.fullscreen-mode .attendance-table td:nth-child(3) {
/* Employee Name */
width: 120px !important;
min-width: 120px !important;
max-width: 120px !important;
}
.fullscreen-mode .attendance-table th:nth-child(4),
.fullscreen-mode .attendance-table td:nth-child(4) {
/* Location */
width: 150px !important;
min-width: 150px !important;
max-width: 150px !important;
}
.fullscreen-mode .attendance-table th:nth-child(5),
.fullscreen-mode .attendance-table td:nth-child(5) {
/* Event */
width: 80px !important;
min-width: 80px !important;
max-width: 80px !important;
white-space: nowrap !important;
}
.fullscreen-mode .attendance-table th:nth-child(6),
.fullscreen-mode .attendance-table td:nth-child(6) {
/* Date */
width: 100px !important;
min-width: 100px !important;
max-width: 100px !important;
white-space: nowrap !important;
}
.fullscreen-mode .attendance-table th:nth-child(7),
.fullscreen-mode .attendance-table td:nth-child(7) {
/* Time */
width: 80px !important;
min-width: 80px !important;
max-width: 80px !important;
white-space: nowrap !important;
}
.fullscreen-mode .attendance-table th:nth-child(8),
.fullscreen-mode .attendance-table td:nth-child(8) {
/* QR Address */
width: 180px !important;
min-width: 180px !important;
max-width: 180px !important;
}
.fullscreen-mode .attendance-table th:nth-child(9),
.fullscreen-mode .attendance-table td:nth-child(9) {
/* Check-in Address */
width: 180px !important;
min-width: 180px !important;
max-width: 180px !important;
}
.fullscreen-mode .attendance-table th:nth-child(10),
.fullscreen-mode .attendance-table td:nth-child(10) {
/* Location Accuracy */
width: 100px !important;
min-width: 100px !important;
max-width: 100px !important;
white-space: nowrap !important;
text-align: center !important;
}
.fullscreen-mode .attendance-table th:nth-child(11),
.fullscreen-mode .attendance-table td:nth-child(11) {
/* Device */
width: 100px !important;
min-width: 100px !important;
max-width: 100px !important;
}
.fullscreen-mode .attendance-table th:nth-child(12),
.fullscreen-mode .attendance-table td:nth-child(12) {
/* Actions */
width: 80px !important;
min-width: 80px !important;
max-width: 80px !important;
white-space: nowrap !important;
text-align: center !important;
}
/* Address columns - allow text to wrap within container */
.fullscreen-mode .address-column,
.fullscreen-mode .attendance-table td:nth-child(8),
.fullscreen-mode .attendance-table td:nth-child(9) {
font-size: 0.75rem !important;
line-height: 1.3 !important;
padding: 0.5rem 0.375rem !important;
}
/* Location accuracy badge styling */
.fullscreen-mode .location-accuracy-badge,
.fullscreen-mode .accuracy-badge {
display: inline-block !important;
padding: 0.25rem 0.5rem !important;
border-radius: 4px !important;
font-size: 0.7rem !important;
white-space: nowrap !important;
}
/* Device info */
.fullscreen-mode .device-info {
font-size: 0.75rem !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
display: block !important;
}
/* Employee info styling */
.fullscreen-mode .employee-id,
.fullscreen-mode .employee-name {
font-size: 0.8125rem !important;
font-weight: 500 !important;
}
/* Location and event info */
.fullscreen-mode .location-info,
.fullscreen-mode .event-info {
font-size: 0.75rem !important;
display: flex !important;
align-items: center !important;
gap: 0.25rem !important;
}
.fullscreen-mode .location-info i,
.fullscreen-mode .event-info i {
flex-shrink: 0 !important;
font-size: 0.7rem !important;
}
/* Address info containers */
.fullscreen-mode .address-info {
display: flex !important;
align-items: flex-start !important;
gap: 0.25rem !important;
word-break: break-word !important;
}
.fullscreen-mode .address-info i {
flex-shrink: 0 !important;
margin-top: 0.125rem !important;
font-size: 0.7rem !important;
}
/* Time display */
.fullscreen-mode .time-info {
font-size: 0.75rem !important;
padding: 0.25rem 0.5rem !important;
background: #f1f5f9 !important;
border-radius: 4px !important;
display: inline-block !important;
}
/* Action buttons */
.fullscreen-mode .record-actions {
display: flex !important;
gap: 0.25rem !important;
justify-content: center !important;
align-items: center !important;
}
.fullscreen-mode .action-btn {
width: 28px !important;
height: 28px !important;
font-size: 0.7rem !important;
padding: 0 !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
}
/* Table layout */
.fullscreen-mode .attendance-table {
table-layout: fixed !important;
width: 100% !important;
}
/* Ensure table container allows horizontal scroll if needed */
.fullscreen-mode .table-container {
overflow-x: auto !important;
-webkit-overflow-scrolling: touch !important;
}
/* ===========================
RESPONSIVE BREAKPOINTS
=========================== */
/* iPad Landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
.fullscreen-mode {
padding: 12px !important;
}
.fullscreen-mode .filter-row {
grid-template-columns: repeat(3, 1fr) !important;
gap: 0.5rem !important;
}
.fullscreen-mode .filter-actions {
grid-column: 1 / -1 !important;
}
.fullscreen-mode .attendance-table {
font-size: 0.7rem !important;
}
.fullscreen-mode .attendance-table th,
.fullscreen-mode .attendance-table td {
padding: 0.5rem 0.375rem !important;
}
/* Adjust column widths for iPad landscape */
.fullscreen-mode .attendance-table th:nth-child(8),
.fullscreen-mode .attendance-table td:nth-child(8),
.fullscreen-mode .attendance-table th:nth-child(9),
.fullscreen-mode .attendance-table td:nth-child(9) {
width: 150px !important;
min-width: 150px !important;
max-width: 150px !important;
}
}
/* iPad Portrait */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
.fullscreen-mode {
padding: 12px !important;
}
.fullscreen-mode .filter-row {
grid-template-columns: repeat(2, 1fr) !important;
gap: 0.5rem !important;
}
.fullscreen-mode .filter-actions {
grid-column: 1 / -1 !important;
}
.fullscreen-mode .attendance-table {
font-size: 0.7rem !important;
}
/* Hide less important columns on iPad portrait */
.fullscreen-mode .attendance-table th:nth-child(11),
.fullscreen-mode .attendance-table td:nth-child(11) {
display: none !important;
}
/* Adjust remaining column widths */
.fullscreen-mode .attendance-table th:nth-child(8),
.fullscreen-mode .attendance-table td:nth-child(8),
.fullscreen-mode .attendance-table th:nth-child(9),
.fullscreen-mode .attendance-table td:nth-child(9) {
width: 140px !important;
min-width: 140px !important;
max-width: 140px !important;
}
}
/* Mobile */
@media (max-width: 767px) {
.fullscreen-toggle-btn {
width: 45px !important;
height: 45px !important;
top: 15px !important;
right: 15px !important;
}
.fullscreen-mode {
padding: 10px !important;
}
.fullscreen-mode .filter-row {
grid-template-columns: 1fr !important;
}
/* Show only essential columns on mobile */
.fullscreen-mode .attendance-table th:nth-child(8),
.fullscreen-mode .attendance-table td:nth-child(8),
.fullscreen-mode .attendance-table th:nth-child(9),
.fullscreen-mode .attendance-table td:nth-child(9),
.fullscreen-mode .attendance-table th:nth-child(10),
.fullscreen-mode .attendance-table td:nth-child(10),
.fullscreen-mode .attendance-table th:nth-child(11),
.fullscreen-mode .attendance-table td:nth-child(11) {
display: none !important;
}
}
/* ===========================
SCROLLBAR STYLING
=========================== */
.fullscreen-mode::-webkit-scrollbar {
width: 10px;
}
.fullscreen-mode::-webkit-scrollbar-track {
background: #f1f5f9;
border-radius: 5px;
}
.fullscreen-mode::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 5px;
}
.fullscreen-mode::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
/* ===========================
OVERSCROLL PREVENTION
=========================== */
.fullscreen-mode {
overscroll-behavior: none !important;
-webkit-overflow-scrolling: touch !important;
}
body.fullscreen-active {
overscroll-behavior: none !important;
overflow: hidden !important;
}
/* ===========================
PRINT STYLES
=========================== */
@media print {
.fullscreen-toggle-btn {
display: none !important;
}
.fullscreen-mode {
position: static !important;
width: 100% !important;
height: auto !important;
padding: 0 !important;
}
}