/* ============================================
   Absensi Publik - Stylesheet
   Mobile-first, standalone (tanpa layout admin)
   ============================================ */

:root {
    --primary: #0d9488;
    --primary-soft: #f0fdfa;
    --primary-dark: #0f766e;
    --secondary: #64748b;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --success-soft: #dcfce7;
}

* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app-container { max-width: 500px; margin: 0 auto; padding: 24px 16px 60px; min-height: 100vh; }

/* Header */
.brand-header { text-align: center; margin-bottom: 32px; padding-top: 20px; }
.brand-logo { width: 48px; height: 48px; background: white; padding: 8px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.04); margin-bottom: 16px; }
.training-title { font-size: 1.25rem; font-weight: 800; color: var(--text-main); margin-bottom: 4px; letter-spacing: -0.025em; }
.training-meta { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

/* Badge */
.badge-absensi { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 0.75rem; padding: 6px 14px; border-radius: 20px; margin-bottom: 20px; letter-spacing: 0.02em; }

/* Card */
.card-minimal { background-color: var(--card-bg); border-radius: 20px; padding: 24px; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 10px 15px -3px rgba(0,0,0,0.03); margin-bottom: 20px; }
.section-label { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; color: var(--primary); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* Input */
.form-floating>.form-control { border-radius: 12px; border: 1px solid var(--border); padding-top: 1.625rem; padding-bottom: 0.625rem; font-weight: 500; }
.form-floating>.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* Buttons */
.btn-primary-modern { background-color: var(--primary); border: none; border-radius: 12px; padding: 12px 24px; font-weight: 600; width: 100%; color: white; transition: all 0.2s ease; box-shadow: 0 4px 12px rgba(13,148,136,0.25); cursor: pointer; font-size: 0.95rem; }
.btn-primary-modern:hover { background-color: var(--primary-dark); box-shadow: 0 6px 16px rgba(13,148,136,0.35); transform: translateY(-1px); }
.btn-primary-modern:active { transform: scale(0.98) translateY(0); }
.btn-primary-modern:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* User Chip */
.user-chip { display: flex; align-items: center; padding: 16px; background: var(--primary-soft); border-radius: 16px; margin-bottom: 24px; gap: 12px; border: 1px solid rgba(13,148,136,0.1); }
.user-avatar { width: 48px; height: 48px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.user-details { flex: 1; min-width: 0; }
.user-name { font-weight: 700; font-size: 0.95rem; color: var(--primary-dark); }
.user-meta { font-size: 0.75rem; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Info Rows */
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.info-value { font-size: 0.85rem; font-weight: 600; color: var(--text-main); text-align: right; max-width: 60%; }

/* Status Hadir */
.status-hadir { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--success-soft); border-radius: 12px; margin-top: 16px; }
.status-hadir i { color: var(--success); font-size: 1.2rem; }
.status-hadir .status-text { font-size: 0.85rem; font-weight: 600; color: #166534; }
.status-hadir .status-time { font-size: 0.75rem; color: #15803d; }

/* Success */
.success-state { text-align: center; padding: 40px 20px; }
.success-circle { width: 88px; height: 88px; background: var(--success-soft); color: var(--success); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 2.8rem; margin-bottom: 24px; animation: scaleIn 0.5s cubic-bezier(0.175,0.885,0.32,1.275); }
.success-info { animation: fadeUp 0.4s ease 0.3s both; }
.time-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 0.85rem; padding: 8px 18px; border-radius: 20px; margin-top: 16px; border: 1px solid rgba(13,148,136,0.1); }

@keyframes scaleIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fadeUp { 0% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

/* Pulse */
.pulse-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; display: inline-block; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(13,148,136,0.4); } 70% { box-shadow: 0 0 0 8px rgba(13,148,136,0); } 100% { box-shadow: 0 0 0 0 rgba(13,148,136,0); } }

/* Footer */
.app-footer { text-align: center; margin-top: 40px; padding-bottom: 20px; }
.footer-logo { width: 32px; opacity: 0.5; margin-bottom: 12px; }
.footer-copy { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

/* Loader */
.btn-loading .spinner-border { width: 1.2rem; height: 1.2rem; margin-right: 8px; }

@media (max-width: 400px) {
    .app-container { padding: 16px 12px; }
    .card-minimal { padding: 20px; }
}
