/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --card-bg: #ffffff;
}

body {
    font-family: 'Hind Siliguri', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
}

/* Glass & Card styles */
.custom-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease-in-out;
}

.custom-card:hover {
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Camera Stream Container */
.camera-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    background-color: #000000;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #3b82f6;
}

#camera-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror camera for front-facing natural view */
}

/* Face guide frame overlay */
.face-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 270px;
    border: 2px dashed rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.face-overlay::after {
    content: "মুখমণ্ডল ফ্রেমের ভেতরে রাখুন";
    position: absolute;
    bottom: -30px;
    font-size: 13px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

/* Scanning laser animation */
.scanner-laser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #3b82f6, #60a5fa, transparent);
    box-shadow: 0 0 15px #3b82f6;
    animation: scanAnim 2.5s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes scanAnim {
    0% { top: 5%; }
    100% { top: 95%; }
}

/* Camera Live badge */
.camera-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
}

.camera-badge .pulse-dot {
    width: 9px;
    height: 9px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Shutter flash effect */
.flash-effect {
    position: absolute;
    inset: 0;
    background-color: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.15s ease-out;
}

.flash-active {
    opacity: 0.95 !important;
}

/* Action Buttons */
.btn-attendance {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-attendance:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

.btn-checkin {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
}

.btn-checkin:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.btn-checkout {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    border: none;
    color: white;
}

.btn-checkout:hover {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: white;
}

/* Status Pill */
.badge-checkin {
    background-color: #dcfce7;
    color: #166534;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
}

.badge-checkout {
    background-color: #fee2e2;
    color: #991b1b;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
}

/* Photo Thumbnail in tables */
.thumb-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s;
}

.thumb-img:hover {
    transform: scale(1.15);
    border-color: #3b82f6;
}
