/* ============================================================================
   SERVESAAS HR - BIOMETRIC FACE ATTENDANCE KIOSK (RESPONSIVE MOBILE & DESKTOP)
   Path: static/css/face_punch.css
   ============================================================================ */

/* 1. KIOSK BASE & THEME */
.kiosk-bg {
    background: linear-gradient(135deg, #090d16 0%, #0f172a 50%, #1e293b 100%) !important;
    min-height: 100vh;
    min-height: 100dvh;
    color: #f8fafc !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 2. KIOSK HEADER */
.kiosk-header {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.7) !important;
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: sticky;
    top: 0;
    z-index: 100;
}

.kiosk-brand-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kiosk-logo-badge {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.kiosk-title-block {
    display: flex;
    flex-direction: column;
}

.kiosk-main-title {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.kiosk-sub-badge {
    font-size: 11px;
    font-weight: 600;
    color: #4ade80;
    margin-top: 2px;
    letter-spacing: 0.2px;
}

/* LIVE CLOCK */
.kiosk-clock-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.kiosk-live-time {
    font-family: 'Inter', monospace;
    font-size: 22px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.kiosk-live-date {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* HEADER ACTION BUTTONS */
.kiosk-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kiosk-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.kiosk-top-enroll-btn {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.3);
}

.kiosk-top-enroll-btn:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: #c084fc;
    transform: translateY(-1px);
}

.kiosk-top-list-btn {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

.kiosk-top-list-btn:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    transform: translateY(-1px);
}

.kiosk-menu-btn {
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid #475569 !important;
    color: #ffffff !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    cursor: pointer;
}

.kiosk-dropdown {
    position: absolute;
    right: 0;
    top: 45px;
    width: 220px;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
    padding: 8px !important;
    z-index: 5000;
    animation: fadeInDropdown 0.18s ease-out;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: rgba(51, 65, 85, 0.8);
    color: #ffffff;
}

.dropdown-item.text-danger {
    color: #f87171;
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

.dropdown-divider {
    height: 1px;
    background: #334155;
    margin: 6px 0;
}

/* 3. MAIN TERMINAL AREA */
.kiosk-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* STATS BAR */
.kiosk-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.kiosk-stat-pill {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid #334155;
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(8px);
}

.stat-label {
    color: #94a3b8;
    font-weight: 600;
}

.stat-val {
    font-weight: 800;
    color: #ffffff;
}

.kiosk-stat-pill.in .stat-val { color: #4ade80; }
.kiosk-stat-pill.out .stat-val { color: #f87171; }

/* 4. CAMERA CONTAINER */
.kiosk-cam-container {
    background: rgba(30, 41, 59, 0.6);
    border: 2px dashed #475569;
    border-radius: 28px;
    padding: 30px 20px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.02);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.kiosk-cam-container:hover {
    border-color: #3b82f6;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 35px rgba(59, 130, 246, 0.25);
}

.kiosk-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 30px 10px;
}

.camera-icon-bubble {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 2px solid #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    animation: pulseIcon 2s infinite alternate;
}

@keyframes pulseIcon {
    0% { transform: scale(1); border-color: #475569; }
    100% { transform: scale(1.06); border-color: #38bdf8; box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3); }
}

.placeholder-text {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.placeholder-sub {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 4/3;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.kiosk-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.face-guide-oval {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 240px;
    border: 2px dashed rgba(56, 189, 248, 0.7);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
}

.kiosk-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    box-shadow: 0 0 15px #38bdf8;
    animation: laserScan 2s infinite alternate ease-in-out;
}

@keyframes laserScan {
    0% { top: 10%; }
    100% { top: 90%; }
}

.kiosk-status {
    background: rgba(15, 23, 42, 0.85);
    color: #38bdf8;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 20px;
    display: inline-block;
    border: 1px solid #0369a1;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 5. CONTROLS */
.kiosk-controls {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 12px;
    width: 100%;
    margin-top: 24px;
}

.kiosk-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    border-radius: 18px;
    font-weight: 800;
    border: none;
    color: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 72px;
}

.kiosk-btn:active {
    transform: scale(0.94);
}

.k-btn-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.k-btn-label {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kiosk-in-btn {
    background: linear-gradient(135deg, #10b981, #047857);
    border: 1px solid #059669;
}

.kiosk-auto-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: 1px solid #2563eb;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

.kiosk-out-btn {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border: 1px solid #dc2626;
}

/* SECONDARY SHORTCUTS */
.kiosk-secondary-actions {
    width: 100%;
    margin-top: 16px;
}

.kiosk-enroll-shortcut-btn {
    width: 100%;
    padding: 14px 18px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 14px;
    color: #e9d5ff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kiosk-enroll-shortcut-btn:hover {
    background: rgba(168, 85, 247, 0.18);
    border-color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.25);
}

/* 6. FULLSCREEN CAMERA OVERLAY */
.term-fs-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    background: #000000;
    z-index: 99999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.fs-control-btn {
    position: absolute;
    top: 20px;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 100002;
    box-shadow: 0 6px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
}

.fs-close-btn {
    left: 20px;
    background: rgba(225, 29, 72, 0.85);
}

.fs-flip-btn {
    right: 20px;
    background: rgba(59, 130, 246, 0.85);
}

.fs-mode-badge {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid #334155;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 0.5px;
    z-index: 100001;
}

.fs-mode-badge.mode-in { color: #4ade80; border-color: #15803d; }
.fs-mode-badge.mode-out { color: #f87171; border-color: #b91c1c; }

.fs-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fs-biometric-oval {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(75vw, 280px);
    height: min(100vw, 380px);
    border: 3px dashed rgba(56, 189, 248, 0.85);
    border-radius: 50%;
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.25), inset 0 0 35px rgba(56, 189, 248, 0.15);
    pointer-events: none;
    z-index: 10;
}

.fs-laser-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    box-shadow: 0 0 20px #38bdf8;
    animation: fsLaserAnim 2s infinite alternate ease-in-out;
    z-index: 11;
}

@keyframes fsLaserAnim {
    0% { top: 20%; }
    100% { top: 80%; }
}

.fs-bottom-bar {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 100002;
}

.term-fs-msg {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

.fs-capture-btn {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 900;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.15s ease;
}

.fs-capture-btn:active {
    transform: scale(0.95);
}

/* SUCCESS CARD */
.term-success-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 360px;
    background: #ffffff;
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    z-index: 100005;
    flex-direction: column;
    align-items: center;
    animation: popSuccess 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popSuccess {
    from { transform: translate(-50%, -40%) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.success-icon-wrap {
    font-size: 64px;
    margin-bottom: 12px;
}

.succ-emp-name {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.succ-emp-code {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 16px 0;
    font-weight: 600;
}

.succ-badge-mode {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.succ-badge-mode.mode-in {
    background: #10b981;
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.succ-badge-mode.mode-out {
    background: #ef4444;
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4);
}

.succ-time-stamp {
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    margin: 14px 0 4px 0;
}

.succ-confidence {
    font-size: 12px;
    font-weight: 600;
    color: #10b981;
    margin: 0;
}

/* 7. FACE ID SETUP MODAL (NEW FEATURE) */
.kiosk-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.kiosk-modal-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    overflow: hidden;
    box-sizing: border-box;
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.kiosk-modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-icon {
    font-size: 26px;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.modal-sub {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0 0;
}

.kiosk-modal-close-btn {
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid #475569;
    color: #cbd5e1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.kiosk-modal-close-btn:hover {
    background: #e11d48;
    color: white;
    border-color: #e11d48;
}

.setup-step-view {
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
}

.setup-search-bar {
    margin-bottom: 14px;
}

.kiosk-emp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.kiosk-emp-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.kiosk-emp-item:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: #38bdf8;
    transform: translateY(-1px);
}

.k-emp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}

.k-emp-info {
    flex: 1;
    min-width: 0;
}

.k-emp-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.k-emp-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.k-emp-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.badge-enrolled {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.k-emp-arrow {
    color: #64748b;
    font-size: 12px;
}

/* ENROLL STEP 2 */
.selected-emp-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.emp-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
}

.emp-meta-block {
    flex: 1;
}

.emp-meta-block h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.emp-meta-block p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.enroll-camera-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    max-height: 260px;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 12px;
}

.enroll-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.enroll-guide-oval {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 180px;
    border: 2px dashed rgba(56, 189, 248, 0.8);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.enroll-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: laserScan 2s infinite alternate ease-in-out;
}

.enroll-status-msg {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #38bdf8;
    padding: 6px;
    margin-bottom: 12px;
}

.enroll-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.enroll-btn {
    padding: 14px;
    font-size: 16px;
    font-weight: 800;
    border-radius: 12px;
}

.enroll-sub-actions {
    display: flex;
    gap: 8px;
}

.enroll-sub-actions button {
    flex: 1;
}

/* 8. TODAY'S PUNCHES SCREEN */
.kiosk-list-bg {
    background: #0f172a !important;
    min-height: 100vh;
    min-height: 100dvh;
}

.kiosk-back-btn {
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.kiosk-list-counter {
    font-size: 12px;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.kiosk-list-main {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px;
}

.term-filter-card {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 16px !important;
    padding: 16px !important;
    margin-bottom: 16px;
}

.term-filter-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.date-picker-wrap {
    flex: 1;
    min-width: 140px;
}

.term-date-input {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
    color-scheme: dark !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    width: 100%;
    cursor: pointer !important;
}

.term-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.95;
    cursor: pointer;
    font-size: 18px;
    padding: 2px 4px;
}

.term-date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.15);
}

.term-filter-group {
    display: flex;
    gap: 6px;
}

.term-filter-btn {
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-weight: 700 !important;
    border-color: #475569 !important;
    color: #94a3b8 !important;
}

.term-filter-btn.active {
    background: #3b82f6 !important;
    color: white !important;
    border-color: #3b82f6 !important;
}

.term-filter-btn.in-btn.active {
    background: #10b981 !important;
    border-color: #10b981 !important;
}

.term-filter-btn.out-btn.active {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
}

.term-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.term-punch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    transition: transform 0.15s ease;
}

.term-punch-item:hover {
    transform: translateY(-1px);
    border-color: #475569;
}

.term-punch-item.punch-in {
    border-left: 4px solid #10b981;
}

.term-punch-item.punch-out {
    border-left: 4px solid #ef4444;
}

.punch-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #334155;
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
}

.punch-emp-meta {
    flex: 1;
    min-width: 0;
}

.punch-emp-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.punch-dept-code {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.punch-time-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.punch-time-text {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
}

.punch-type-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
}

.badge-in {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge-out {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.term-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

/* SPINNER */
.kiosk-spinner {
    border: 3px solid rgba(255,255,255,0.2);
    border-top: 3px solid #38bdf8;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    animation: termSpin 0.9s linear infinite;
}

@keyframes termSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 9. MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    #punch-terminal-screen .kiosk-header {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto !important;
        grid-template-areas:
            "brand actions"
            "clock actions" !important;
        align-items: center !important;
        padding: 10px 14px !important;
        min-height: 80px !important;
        row-gap: 4px !important;
        column-gap: 12px !important;
    }

    #punch-terminal-screen .kiosk-brand-area {
        grid-area: brand;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        min-width: 0 !important;
    }

    #punch-terminal-screen .kiosk-logo-badge {
        width: 34px !important;
        height: 34px !important;
        font-size: 18px !important;
        border-radius: 9px !important;
        flex-shrink: 0 !important;
    }

    #punch-terminal-screen .kiosk-title-block {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    #punch-terminal-screen .kiosk-main-title {
        font-size: 15px !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
    }

    #punch-terminal-screen .kiosk-sub-badge {
        font-size: 10px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        margin-top: 0 !important;
    }

    /* HORIZONTAL LIVE TIME DIRECTLY UNDER COMPANY NAME */
    #punch-terminal-screen .kiosk-clock-block {
        grid-area: clock;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
        gap: 8px !important;
        padding-left: 44px !important; /* Aligns with company name below 34px logo + 10px gap */
        min-width: 0 !important;
    }

    #punch-terminal-screen .kiosk-live-time {
        font-size: 14px !important;
        font-weight: 800 !important;
        color: #38bdf8 !important;
        letter-spacing: 0.5px !important;
        white-space: nowrap !important;
        text-shadow: none !important;
    }

    #punch-terminal-screen .kiosk-live-date {
        font-size: 10px !important;
        font-weight: 600 !important;
        color: #94a3b8 !important;
        white-space: nowrap !important;
        border-left: 1px solid rgba(148, 163, 184, 0.35) !important;
        padding-left: 8px !important;
    }

    #punch-terminal-screen .kiosk-header-actions {
        grid-area: actions;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
    }

    .kiosk-top-btn .top-btn-text {
        display: none !important;
    }

    .kiosk-top-btn {
        padding: 8px 10px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        justify-content: center !important;
        border-radius: 9px !important;
    }

    .kiosk-menu-btn {
        min-width: 36px !important;
        min-height: 36px !important;
        padding: 4px 10px !important;
        border-radius: 9px !important;
        font-size: 16px !important;
    }

    .kiosk-main {
        padding: 14px;
    }

    .kiosk-cam-container {
        padding: 24px 14px;
        border-radius: 22px;
    }

    .camera-icon-bubble {
        width: 70px;
        height: 70px;
        font-size: 34px;
    }

    .placeholder-text {
        font-size: 18px;
    }

    .kiosk-controls {
        gap: 8px;
    }

    .kiosk-btn {
        padding: 12px 6px;
        min-height: 64px;
    }

    .k-btn-icon {
        font-size: 20px;
    }

    .k-btn-label {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .kiosk-brand-area .kiosk-logo-badge {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .kiosk-main-title {
        font-size: 14px;
    }

    .kiosk-sub-badge {
        display: none;
    }

    .kiosk-live-time {
        font-size: 15px;
    }

    .kiosk-stats-bar {
        gap: 6px;
    }

    .kiosk-stat-pill {
        font-size: 11px;
        padding: 4px 10px;
    }
}


/* ==========================================================================
   DARK THEME ENHANCEMENTS FOR TERMINAL DROPDOWNS & FILTER CARDS
   ========================================================================== */
.kiosk-dropdown,
#term-menu-dropdown {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7) !important;
}

.kiosk-dropdown .dropdown-item,
#term-menu-dropdown .dropdown-item {
    color: #f8fafc !important;
}

.kiosk-dropdown .dropdown-item:hover,
#term-menu-dropdown .dropdown-item:hover {
    background: #334155 !important;
    color: #38bdf8 !important;
}

.term-filter-card {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
}

.term-period-btn {
    background: transparent;
    border: 1px solid #475569 !important;
    color: #cbd5e1 !important;
    transition: all 0.2s ease;
}

.term-period-btn:hover {
    background: #334155 !important;
    color: #ffffff !important;
}

.term-period-btn.active {
    background: #3182ce !important;
    border-color: #3182ce !important;
    color: #ffffff !important;
}

.term-filter-btn {
    border: 1px solid #475569 !important;
    color: #cbd5e1 !important;
}

.term-filter-btn.active {
    background: #3182ce !important;
    border-color: #3182ce !important;
    color: #ffffff !important;
}

.term-filter-btn.in-btn.active {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

.term-filter-btn.out-btn.active {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}
