/* style.css - extracted from index.html */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Prompt:wght@400;500;600&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f8f9fa;
min-height: 100vh;
color: #333;
line-height: 1.6;
}
.container {
max-width: 480px;
margin: 0 auto;
background: white;
min-height: 100vh;
}
.header {
background: white;
padding: 20px 16px;
border-bottom: 1px solid #e9ecef;
position: sticky;
top: 0;
z-index: 100;
}
.header h1 {
font-size: 1.5rem;
font-weight: 600;
color: #333;
text-align: center;
margin-bottom: 8px;
}
.status-indicator {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 6px;
background: #10b981;
}
.status-text {
font-size: 0.875rem;
color: #6b7280;
text-align: center;
}
.main-content {
padding: 16px;
}
.camera-section {
margin-bottom: 24px;
}
.camera-container {
position: relative;
width: 100%;
border-radius: 12px;
overflow: hidden;
background: #f3f4f6;
margin-bottom: 16px;
}
#video {
width: 100%;
height: 280px;
object-fit: cover;
display: block;
}
.face-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
}
.face-box {
position: absolute;
border: 3px solid #10b981;
border-radius: 8px;
background: rgba(16, 185, 129, 0.1);
box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
0%, 100% {
border-color: #10b981;
box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}
50% {
border-color: #34d399;
box-shadow: 0 0 25px rgba(52, 211, 153, 0.7);
}
}
.controls {
display: flex;
flex-direction: column;
gap: 12px;
}
.btn {
background: #374151;
color: white;
border: none;
padding: 16px;
border-radius: 8px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.btn:hover:not(:disabled) {
background: #4b5563;
}
.btn:active:not(:disabled) {
transform: scale(0.98);
}
.btn.check-in {
background: #10b981;
}
.btn.check-in:hover:not(:disabled) {
background: #059669;
}
.btn.check-out {
background: #ef4444;
}
.btn.check-out:hover:not(:disabled) {
background: #dc2626;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.info-section {
background: #f9fafb;
padding: 16px;
border-radius: 8px;
margin-bottom: 24px;
}
.info-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin-bottom: 16px;
}
.info-item {
text-align: center;
}
.info-item h3 {
font-size: 0.75rem;
color: #6b7280;
text-transform: uppercase;
font-weight: 500;
margin-bottom: 4px;
letter-spacing: 0.5px;
}
.info-item p {
font-size: 0.875rem;
color: #111827;
font-weight: 500;
}
.location-info {
padding-top: 16px;
border-top: 1px solid #e5e7eb;
}
.location-info h3 {
font-size: 0.75rem;
color: #6b7280;
text-transform: uppercase;
font-weight: 500;
margin-bottom: 8px;
letter-spacing: 0.5px;
}
.location-info p {
font-size: 0.875rem;
color: #111827;
margin-bottom: 4px;
}
.history-section {
background: #f9fafb;
padding: 16px;
border-radius: 8px;
}
.history-section h3 {
font-size: 1rem;
color: #111827;
margin-bottom: 16px;
font-weight: 600;
}
.history-tabs {
display: flex;
gap: 8px;
margin-bottom: 16px;
}
.history-tab {
flex: 1 1 0;
background: #e5e7eb;
border: none;
border-radius: 6px 6px 0 0;
padding: 10px 0;
font-size: 1rem;
color: #374151;
font-family: inherit;
font-weight: 500;
cursor: pointer;
transition: background 0.2s, color 0.2s;
}
.history-tab.active {
background: #fff;
color: #10b981;
border-bottom: 2px solid #10b981;
z-index: 1;
}
.history-item {
background: white;
padding: 16px;
border-radius: 8px;
margin-bottom: 12px;
border-left: 3px solid #10b981;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.history-item.check-out {
border-left-color: #ef4444;
}
.history-details {
flex: 1 1 0%;
min-width: 0;
}
.history-face {
flex-shrink: 0;
margin-left: 12px;
display: flex;
align-items: center;
height: 80px;
}
.history-face img {
width: 64px;
height: 64px;
border-radius: 8px;
object-fit: cover;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.alert {
padding: 12px 16px;
border-radius: 8px;
margin-bottom: 16px;
font-size: 0.875rem;
}
.alert.success {
background: #d1fae5;
color: #065f46;
border: 1px solid #a7f3d0;
}
.alert.error {
background: #fee2e2;
color: #991b1b;
border: 1px solid #fecaca;
}
.alert.warning {
background: #fef3c7;
color: #92400e;
border: 1px solid #fde68a;
}
.alert.info {
background: #dbeafe;
color: #1e40af;
border: 1px solid #93c5fd;
}
.loading {
display: none;
text-align: center;
padding: 24px;
}
.spinner {
width: 32px;
height: 32px;
border: 2px solid #f3f3f3;
border-top: 2px solid #6b7280;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 12px;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.empty-state {
text-align: center;
padding: 32px 16px;
color: #6b7280;
}
.empty-state p {
font-size: 0.875rem;
}
.main-tabs {
display: flex;
gap: 8px;
margin: 0 0 20px 0;
}
.main-tab {
flex: 1 1 0;
background: #e5e7eb;
border: none;
border-radius: 8px 8px 0 0;
padding: 14px 0;
font-size: 1.1rem;
color: #374151;
font-family: inherit;
font-weight: 600;
cursor: pointer;
transition: background 0.2s, color 0.2s;
outline: none;
}
.main-tab.active {
background: #fff;
color: #10b981;
border-bottom: 2px solid #10b981;
z-index: 2;
}
/* Success Notification Styles */
.success-notification {
background: linear-gradient(135deg, #10b981, #059669);
color: white;
border-radius: 12px;
padding: 16px;
margin-bottom: 16px;
box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
display: flex;
align-items: center;
gap: 12px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.notification-icon {
font-size: 24px;
animation: bounce 1s ease-in-out;
}
.notification-content h3 {
margin: 0 0 4px 0;
font-size: 16px;
font-weight: 600;
}
.notification-content p {
margin: 0;
font-size: 14px;
opacity: 0.9;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {
transform: translateY(0);
}
40% {
transform: translateY(-10px);
}
60% {
transform: translateY(-5px);
}
}
/* Daily Summary Styles */
.daily-summary {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 16px;
margin-top: 16px;
}
.daily-summary h3 {
margin: 0 0 12px 0;
font-size: 16px;
color: #374151;
}
.summary-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.summary-item {
display: flex;
flex-direction: column;
text-align: center;
padding: 12px;
background: white;
border-radius: 6px;
border: 1px solid #e5e7eb;
}
.summary-label {
font-size: 12px;
color: #6b7280;
margin-bottom: 4px;
}
.summary-value {
font-size: 14px;
font-weight: 600;
color: #374151;
}
/* Mobile optimizations */
@media (max-width: 480px) {
.container {
max-width: 100%;
}
.header {
padding: 16px 12px;
}
.main-content {
padding: 12px;
}
#video {
height: 240px;
}
.info-grid {
grid-template-columns: 1fr;
gap: 12px;
}
.btn {
padding: 14px;
font-size: 0.875rem;
}
}
/* Safe area for phones with notch */
@supports (padding-top: env(safe-area-inset-top)) {
.header {
padding-top: calc(env(safe-area-inset-top) + 20px);
}
}