/* Smartphone App Frame & Components */
.phone-frame {
    width: 380px;
    max-width: 100%;
    height: 760px;
    background: var(--slate-50);
    border-radius: 38px;
    border: 10px solid var(--slate-900);
    box-shadow: 0 25px 50px -12px rgba(15, 41, 74, 0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-statusbar {
    background: var(--blue-900);
    color: var(--white);
    padding: 8px 18px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.phone-notch { width: 90px; height: 14px; background: var(--slate-900); border-radius: 99px; }

/* Security Blocker Overlay */
.security-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}
.security-card {
    background: var(--white);
    border-radius: 20px;
    padding: 22px;
    text-align: center;
    border-top: 5px solid var(--danger);
}
.sec-icon-pulse { font-size: 2.5rem; margin-bottom: 10px; }
.security-card h3 { color: var(--danger); font-size: 1.1rem; margin-bottom: 8px; }
.security-card p { font-size: 0.82rem; color: var(--slate-700); line-height: 1.45; margin-bottom: 14px; }
.sec-steps {
    background: var(--slate-100);
    padding: 12px;
    border-radius: 10px;
    text-align: left;
    font-size: 0.78rem;
    color: var(--slate-700);
    margin-bottom: 16px;
}
.sec-steps ol { padding-left: 18px; margin-top: 6px; }
.sec-steps li { margin-bottom: 4px; }

/* Server Banner */
.server-banner {
    background: var(--blue-100);
    border-bottom: 1px solid var(--blue-600);
    color: var(--blue-900);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
}
.server-banner button { background: none; border: none; font-size: 1.1rem; cursor: pointer; margin-left: auto; }

/* App Header */
.app-header {
    background: linear-gradient(135deg, var(--blue-900), var(--blue-600));
    color: var(--white);
    padding: 14px 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}
.user-profile-mini { display: flex; align-items: center; gap: 10px; }
.avatar-circle {
    width: 38px; height: 38px;
    background: var(--white); color: var(--blue-700);
    border-radius: 50%; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.user-profile-mini h4 { font-size: 0.9rem; }
.user-profile-mini span { font-size: 0.72rem; color: var(--blue-100); }
.device-badge { background: rgba(255,255,255,0.18); font-size: 0.7rem; padding: 4px 8px; border-radius: 8px; }

/* Phone Body */
.phone-body { flex: 1; overflow-y: auto; padding: 14px; }

/* Geofencing Card */
.geo-card {
    background: var(--white);
    border-radius: 14px;
    padding: 12px;
    border-left: 4px solid var(--success);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 12px;
}
.geo-card.invalid { border-left-color: var(--danger); background: #fef2f2; }
.geo-header { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 700; margin-bottom: 6px; }
.geo-badge { color: var(--success); }
.geo-card.invalid .geo-badge { color: var(--danger); }
.geo-details { font-size: 0.76rem; color: var(--slate-700); line-height: 1.5; }
.text-success { color: var(--success); font-weight: 600; }

/* Offline Buffer Alert */
.offline-alert {
    background: #fffbeb;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.74rem;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.badge-count { background: #d97706; color: white; padding: 2px 7px; border-radius: 99px; font-weight: 700; white-space: nowrap; }

/* Biometric Scanner */
.biometric-box {
    background: var(--white);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.camera-viewport {
    height: 165px;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding: 12px;
}
.face-reticle {
    width: 92px; height: 112px;
    border: 2px dashed #38bdf8;
    border-radius: 50%;
    margin-bottom: 8px;
}
@keyframes scanMove { 0%, 100% { top: 10%; } 50% { top: 85%; } }
.scan-line {
    position: absolute;
    left: 15%; right: 15%; height: 2px;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
    animation: scanMove 2.5s infinite ease-in-out;
}
#liveness-instruction { font-size: 0.72rem; color: #e2e8f0; }
.liveness-checks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; justify-content: center; }
.chk-pill { font-size: 0.68rem; background: var(--blue-50); color: var(--blue-700); padding: 3px 8px; border-radius: 99px; font-weight: 600; }

/* Action Buttons */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.btn-action {
    border: none; border-radius: 12px; padding: 12px 10px;
    color: var(--white); cursor: pointer; text-align: left;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-action:active { transform: scale(0.97); }
.btn-action.checkin { background: linear-gradient(135deg, var(--blue-700), var(--blue-600)); }
.btn-action.checkout { background: linear-gradient(135deg, var(--slate-700), var(--slate-900)); }
.act-title { display: block; font-size: 0.78rem; font-weight: 700; }
.act-sub { display: block; font-size: 0.68rem; opacity: 0.85; margin-top: 2px; }

/* Card & Form in Mobile */
.card-section { background: var(--white); border-radius: 14px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); margin-bottom: 12px; }
.card-section h5 { font-size: 0.84rem; color: var(--blue-900); margin-bottom: 10px; }
.mobile-form label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--slate-700); margin: 8px 0 4px; }
.mobile-form input, .mobile-form select, .mobile-form textarea, #input-daily-journal {
    width: 100%; padding: 8px 10px; border: 1px solid var(--slate-300); border-radius: 8px; font-size: 0.8rem;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-primary-full {
    width: 100%; background: var(--blue-600); color: var(--white);
    border: none; padding: 10px; border-radius: 10px; font-weight: 600; font-size: 0.82rem; cursor: pointer; margin-top: 10px;
}

/* History & Stats */
.stats-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat-mini { background: var(--white); padding: 10px; border-radius: 12px; text-align: center; }
.stat-mini .val { display: block; font-size: 1.1rem; font-weight: 800; color: var(--success); }
.stat-mini .val.text-amber { color: var(--warning); }
.stat-mini .val.text-blue { color: var(--blue-600); }
.stat-mini .lbl { font-size: 0.7rem; color: var(--slate-500); }
.history-item { border-bottom: 1px solid var(--slate-200); padding: 8px 0; font-size: 0.76rem; }
.history-item:last-child { border-bottom: none; }

/* Bottom Nav */
.phone-bottom-nav {
    background: var(--white);
    border-top: 1px solid var(--slate-200);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 6px 0;
}
.nav-item {
    background: none; border: none; display: flex; flex-direction: column; align-items: center;
    gap: 2px; font-size: 0.72rem; color: var(--slate-500); cursor: pointer; padding: 4px;
}
.nav-item.active { color: var(--blue-600); font-weight: 700; }
.nav-ico { font-size: 1.05rem; }
