* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0ea5a0 0%, #0d9488 55%, #0f766e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #1e293b;
}

.phone-card {
    width: 100%;
    max-width: 370px;
    min-height: 560px;
    background-color: #ffffff;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(8, 51, 68, 0.28);
    display: flex;
    flex-direction: column;
}

.view {
    display: none;
    flex: 1;
    flex-direction: column;
}

.view.active {
    display: flex;
}

.top-banner {
    background-color: #0d9488;
    color: #ffffff;
    padding: 28px 24px 24px;
    text-align: left;
}

.top-banner h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.top-banner p {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.88);
}

.simple-header {
    position: relative;
    padding: 24px 20px 10px;
    text-align: center;
}

.simple-header h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
}

.close-btn {
    position: absolute;
    right: 18px;
    top: 18px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.card-body {
    flex: 1;
    padding: 28px 26px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.alert-warn {
    width: 100%;
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.8rem;
    margin-bottom: 18px;
    line-height: 1.4;
}

/* Bingkai Scan Awal */
.scan-frame-placeholder {
    position: relative;
    width: 220px;
    height: 220px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 34px;
}

.face-icon {
    width: 112px;
    height: 112px;
}

.corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: #94a3b8;
    border-style: solid;
    border-width: 0;
}

.corner.light {
    border-color: rgba(255, 255, 255, 0.92);
}

.corner.tl { top: 12px; left: 12px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; }
.corner.tr { top: 12px; right: 12px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 6px; }
.corner.bl { bottom: 12px; left: 12px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 6px; }
.corner.br { bottom: 12px; right: 12px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; }

/* Kamera & Garis Scan */
.camera-frame {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 16px;
    overflow: hidden;
    background-color: #0f172a;
    margin-bottom: 24px;
}

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

.scan-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.scan-line {
    position: absolute;
    left: 16px;
    right: 16px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2dd4bf, transparent);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.9);
    animation: scanMove 2s ease-in-out infinite;
}

@keyframes scanMove {
    0% { top: 18px; }
    50% { top: calc(100% - 21px); }
    100% { top: 18px; }
}

.scan-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
}

.progress-track {
    width: 100%;
    max-width: 240px;
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-bar {
    height: 100%;
    width: 15%;
    background-color: #0d9488;
    border-radius: 999px;
    transition: width 0.45s ease;
}

/* Animasi Terverifikasi (Layar 3) */
.verified-avatar-wrap {
    position: relative;
    width: 156px;
    height: 156px;
    margin-bottom: 24px;
    animation: popIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.avatar-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, #ccfbf1, #5eead4);
    box-shadow: 0 10px 28px rgba(13, 148, 136, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.avatar-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #0d9488;
    color: #ffffff;
    font-size: 3.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #10b981;
    border: 3px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
    animation: badgePop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

.check-badge svg {
    width: 20px;
    height: 20px;
}

.check-path {
    stroke-dasharray: 28;
    stroke-dashoffset: 28;
    animation: drawCheck 0.45s ease 0.35s forwards;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.84); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes badgePop {
    from { opacity: 0; transform: scale(0.3); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.failed-badge {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #fee2e2;
    color: #dc2626;
    font-size: 2.4rem;
    line-height: 72px;
    margin-bottom: 18px;
}

.verified-title {
    font-size: 1.18rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.helper-text {
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.5;
    max-width: 260px;
    margin-bottom: 24px;
}

/* Tombol */
.btn-teal {
    width: 100%;
    max-width: 240px;
    padding: 13px 20px;
    border: none;
    border-radius: 999px;
    background-color: #0d9488;
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.15s ease, transform 0.1s ease;
    margin-bottom: 12px;
}

.btn-teal:hover {
    background-color: #0f766e;
}

.btn-teal:active {
    transform: scale(0.98);
}

.btn-logout {
    background-color: #334155;
}

.btn-logout:hover {
    background-color: #1e293b;
}

.btn-text {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.86rem;
    cursor: pointer;
    padding: 6px 12px;
}

.hidden {
    display: none !important;
}

/* =========================================================
   HALAMAN DASHBOARD SELAMAT DATANG
   ========================================================= */
body.dash-body {
    background: #f1f5f9;
    display: block;
    padding: 0;
    color: #0f172a;
}

.dash-nav {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dash-nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background-color: #0d9488;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: #0f172a;
}

.brand-sub {
    font-size: 0.78rem;
    color: #64748b;
}

.dash-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user-pill {
    font-size: 0.86rem;
    font-weight: 600;
    color: #0f766e;
    background-color: #ccfbf1;
    padding: 6px 12px;
    border-radius: 999px;
}

.btn-nav-logout {
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #334155;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

.btn-nav-logout:hover {
    background-color: #1e293b;
}

.dash-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dash-welcome-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.dash-welcome-left {
    max-width: 560px;
}

.dash-status-pill {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #047857;
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.dash-welcome-left h1 {
    font-size: 1.85rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.dash-welcome-left p {
    font-size: 0.94rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 22px;
}

.btn-dash-logout {
    display: inline-block;
    text-decoration: none;
    background-color: #0d9488;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 10px;
    transition: background-color 0.15s ease;
}

.btn-dash-logout:hover {
    background-color: #0f766e;
}

.dash-avatar-wrap {
    width: 132px;
    height: 132px;
    margin-bottom: 0;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.dash-stat-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 22px;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
}

.stat-value.stat-accent {
    color: #0d9488;
}

.stat-value.stat-sm {
    font-size: 1.05rem;
}

.stat-note {
    font-size: 0.8rem;
    color: #94a3b8;
}

.dash-members-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px 24px;
}

.dash-members-card h2 {
    font-size: 0.96rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 14px;
}

.member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    min-width: 180px;
}

.member-item.member-active {
    border-color: #0d9488;
    background-color: #f0fdfa;
}

.member-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #0d9488;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.member-role {
    font-size: 0.78rem;
    color: #64748b;
}

@media (max-width: 720px) {
    .dash-welcome-card {
        flex-direction: column-reverse;
        text-align: center;
        padding: 24px;
    }
    .dash-grid {
        grid-template-columns: 1fr;
    }
}
