/* style.css - ULTIMATE PRECISION FIX */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');



:root {

    --primary-green: #007f5f;

    --dark-green: #081c15;

    --bg-light: #f4f7f6;

    --text-main: #2d3436;

    --text-muted: #636e72;

    --white: #ffffff;

    --soft-green: #f0f7f4; /* Definisi warna soft untuk background ikon/header */

}



* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

    font-family: 'Plus Jakarta Sans', sans-serif;

}



body {

    background-color: #d1d8e0;

    display: flex;

    justify-content: center;

    min-height: 100vh;

     padding-top: env(safe-area-inset-top);
    
    padding-bottom: env(safe-area-inset-bottom);
}



.app-container {

    width: 100%;

    max-width: 450px;

    background-color: var(--white);

    min-height: 100vh;

    min-height: -webkit-fill-available;    

    box-shadow: 0 0 40px rgba(0,0,0,0.1);

    display: flex;

    flex-direction: column;

    overflow-x: hidden; /* Mencegah elemen meluap ke samping */

}



/* --- AUTH WRAPPER --- */

.auth-wrapper {

    padding: 30px 25px;

    width: 100%;

}



.auth-header {

    text-align: center;

    margin-bottom: 25px;

}



/* KUNCI PERBAIKAN: Membatasi Logo agar tidak merusak layout */

.auth-logo {

    max-width: 120px;

    height: auto;

    margin-bottom: 15px;

}



.auth-header h1 { font-size: 24px; color: var(--text-main); }

.auth-header p { font-size: 13px; color: var(--text-muted); margin-top: 5px; }



/* --- FORM STYLES --- */

.form-group {

    margin-bottom: 16px;

    width: 100%;

}



.form-group label {

    display: block;

    font-size: 12px;

    font-weight: 700;

    margin-bottom: 6px;

    color: var(--text-main);

}



.input-box {

    display: flex;

    align-items: center;

    background: #f8fafc;

    border: 1.5px solid #e2e8f0;

    border-radius: 12px;

    padding: 12px 16px;

    gap: 12px;

}



.input-box i {

    color: var(--primary-green);

    font-size: 14px;

    width: 18px;

    text-align: center;

}



.input-box input, .input-box select, .input-box textarea {

    border: none;

    outline: none;

    background: transparent;

    width: 100%;

    font-size: 14px;

    color: var(--text-main);

}



.btn-submit {

    width: 100%;

    background: var(--primary-green);

    color: white;

    padding: 16px;

    border: none;

    border-radius: 12px;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    margin: 20px 0;

}



/* --- KUNCI UKURAN FOTO HEADER DASHBOARD --- */

.user-profile-mini {

    display: flex;

    align-items: center;

    gap: 12px;

}



.mini-img {

    width: 45px !important;    /* Ukuran wajib segini agar rapi */

    height: 45px !important;   /* Wajib sama agar bulat sempurna */

    border-radius: 50% !important;

    object-fit: cover !important; /* Foto tidak akan gepeng */

    border: 2px solid var(--primary-green);

    box-shadow: 0 2px 8px rgba(0, 127, 95, 0.2);

    background-color: #eee;

}



/* Tambahan agar teks di samping foto tidak berantakan */

.nav-txt h3 { font-size: 14px; font-weight: 700; margin: 0; color: var(--text-main); }

.nav-txt p { font-size: 11px; color: var(--text-muted); margin: 0; }





/* --- BIODATA INFO STYLES --- */

.info-item {

    display: flex;

    align-items: center;

    background: #f8fafc;

    border-radius: 16px;

    padding: 15px;

    margin-bottom: 12px;

    border: 1px solid #edf2f7;

}



.info-icon {

    width: 40px;

    height: 40px;

    background: var(--soft-green);

    border-radius: 10px;

    display: flex;

    justify-content: center;

    align-items: center;

    margin-right: 15px;

}



.info-icon i {

    color: var(--primary-green);

    font-size: 16px;

}



.info-content label {

    display: block;

    font-size: 10px;

    color: var(--text-muted);

    font-weight: 600;

    text-transform: uppercase;

    margin-bottom: 2px;

}



.info-content p {

    font-size: 14px;

    font-weight: 700;

    color: var(--text-main);

}



/* --- PRO TABLE & SUMMARY STYLES KEPRIBADIAN --- */

.content-body { padding: 0 20px 40px 20px; }



.table-section {

    background: white;

    border-radius: 20px;

    margin-bottom: 25px;

    box-shadow: 0 5px 15px rgba(0,0,0,0.03);

    overflow: hidden;

    border: 1px solid #edf2f7;

}



.section-header {

    background: var(--soft-green);

    color: var(--primary-green);

    padding: 12px 20px;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1px;

}



.pro-table {

    width: 100%;

    border-collapse: collapse;

}



.pro-table th {

    text-align: left;

    padding: 12px 15px;

    font-size: 10px;

    color: var(--text-muted);

    border-bottom: 1px solid #edf2f7;

}



.pro-table td {

    padding: 12px 15px;

    font-size: 12px;

    color: var(--text-main);

    font-weight: 600;

    border-bottom: 1px solid #f8fafc;

}



.tag {

    padding: 3px 8px;

    border-radius: 6px;

    font-size: 10px;

    font-weight: 800;

    color: white;

}



.tag.k { background: #ff4757; }

.tag.c { background: #ffa502; }

.tag.b { background: #2ed573; }

.tag.bs { background: #1e90ff; }



/* Summary Card */

.summary-card {

    background: var(--dark-green);

    border-radius: 24px;

    padding: 25px;

    color: white;

    margin-bottom: 25px;

}



.summary-card h4 { font-size: 14px; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }

.summary-item { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; opacity: 0.9; }



.final-score {

    text-align: center;

    margin-top: 20px;

}



.final-score h1 { font-size: 42px; font-weight: 800; margin: 5px 0; }

.status-badge {

    background: #ff4757;

    padding: 5px 15px;

    border-radius: 50px;

    font-size: 11px;

    font-weight: 800;

}



.legend-container {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-bottom: 25px;

}



.leg-item { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }



.btn-update {

    width: 100%;

    background: #ffa502;

    color: white;

    padding: 16px;

    border: none;

    border-radius: 15px;

    font-weight: 700;

    font-size: 14px;

    cursor: pointer;

    box-shadow: 0 10px 20px rgba(255, 165, 2, 0.2);

}



/* --- KESJAS TABLE ADD-ONS --- */

.pro-table thead th {

    text-align: center;

    vertical-align: middle;

    background: #f1f2f6;

    border: 1px solid #dfe4ea;

    font-size: 9px;

}



.pro-table tbody td {

    text-align: center;

    border: 1px solid #f1f2f6;

}



/* Scrollbar Style */

div::-webkit-scrollbar {

    height: 4px;

}

div::-webkit-scrollbar-thumb {

    background: var(--primary-green);

    border-radius: 10px;

}



/* --- SWIMMING TAB STYLES --- */

.tab-container {

    display: flex;

    background: #f1f2f6;

    padding: 5px;

    border-radius: 12px;

    margin-bottom: 20px;

    gap: 5px;

}



.tab-item {

    flex: 1;

    text-align: center;

    padding: 10px 0;

    font-size: 11px;

    font-weight: 800;

    color: var(--text-muted);

    cursor: pointer;

    border-radius: 8px;

    transition: 0.3s;

}



.tab-item.active {

    background: var(--white);

    color: var(--primary-green);

    box-shadow: 0 4px 10px rgba(0,0,0,0.05);

}



.tab-item:hover:not(.active) {

    background: rgba(255,255,255,0.5);

}



/* --- HIRBAK LIST STYLES --- */

.hirbak-list {

    display: flex;

    flex-direction: column;

    gap: 12px;

}



.hirbak-item {

    display: flex;

    align-items: center;

    background: var(--white);

    padding: 15px;

    border-radius: 16px;

    border: 1px solid #edf2f7;

    box-shadow: 0 4px 6px rgba(0,0,0,0.02);

    cursor: pointer;

    transition: 0.2s;

}



.hirbak-item:active {

    transform: scale(0.98);

    background: #f8fafc;

}



.hirbak-icon {

    width: 45px;

    height: 45px;

    background: var(--soft-green);

    border-radius: 12px;

    display: flex;

    justify-content: center;

    align-items: center;

    margin-right: 15px;

}



.hirbak-icon i {

    color: var(--primary-green);

    font-size: 18px;

}



.hirbak-info {

    flex: 1;

}



.hirbak-info h4 {

    font-size: 11px;

    font-weight: 800;

    color: var(--text-main);

    margin-bottom: 2px;

    letter-spacing: 0.5px;

}



.hirbak-info p {

    font-size: 10px;

    color: var(--text-muted);

}



.arrow-icon {

    font-size: 14px;

    color: #cbd5e0;

}



/* --- FAQ ACCORDION PREMIUM --- */

.faq-container {

    display: flex;

    flex-direction: column;

    gap: 15px;

}



.faq-wrapper {

    background: #ffffff;

    border: 1px solid #edf2f7;

    border-radius: 16px;

    overflow: hidden;

    transition: all 0.3s ease;

    box-shadow: 0 4px 6px rgba(0,0,0,0.02);

}



.faq-header {

    padding: 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    cursor: pointer;

    background: #f8fafc;

    transition: background 0.2s;

}



.faq-header span {

    font-size: 14px;

    font-weight: 700;

    color: var(--text-main);

    padding-right: 15px;

}



.faq-header i {

    color: var(--text-muted);

    font-size: 14px;

    transition: transform 0.3s ease;

}



.faq-answer {

    max-height: 0;

    overflow: hidden;

    padding: 0 20px;

    background: #fff;

    transition: all 0.3s ease;

}



.faq-answer p {

    padding: 15px 0 20px 0;

    font-size: 13px;

    color: var(--text-muted);

    line-height: 1.6;

}



.faq-wrapper.open {

    border-color: var(--primary-green);

    box-shadow: 0 10px 20px rgba(0, 127, 95, 0.05);

}



.faq-wrapper.open .faq-header {

    background: #fff;

}



.faq-wrapper.open .faq-header i {

    transform: rotate(180deg);

    color: var(--primary-green);

}



.faq-wrapper.open .faq-answer {

    max-height: 200px;

    padding: 0 20px;

}





/* Warna Global Mode Taktis */

body.dark-mode {

    background-color: #020617 !important;

    color: #f8fafc !important;

}



/* Kartu dan Input di Halaman Login/Register/Menu */

body.dark-mode .card,

body.dark-mode .grid-item,

body.dark-mode .login-box,

body.dark-mode .info-item,

body.dark-mode .sikap-section {

    background-color: #0f172a !important;

    border: 1px solid #1e293b !important;

    color: #f8fafc !important;

}



body.dark-mode input {

    background-color: #1e293b !important;

    color: white !important;

    border-color: #334155 !important;

}



body.dark-mode span, body.dark-mode label, body.dark-mode p {

    color: #94a3b8 !important;

}

/* --- UI REFINEMENT: MICRO-ANIMATIONS & GLASS --- */
.grid-item {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grid-item:active {
    transform: scale(0.9) rotate(-2deg); /* Efek membal saat ditekan */
}

.icon-wrapper {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Efek Kilatan Cahaya pada Ikon */
.icon-wrapper::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
}

.grid-item:hover .icon-wrapper::after {
    left: 100%;
}

/* STYLE UNTUK DIGITAL KTA (MEWAH) */
.kta-card {
    background: linear-gradient(135deg, #081c15 0%, #007f5f 100%);
    border-radius: 20px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 127, 95, 0.3);
    margin-bottom: 25px;
    display: none; /* Muncul hanya di halaman Biodata */
}

.kta-card::before {
    content: 'TNI AD';
    position: absolute;
    right: -10px; bottom: -10px;
    font-size: 80px;
    font-weight: 900;
    opacity: 0.05;
}

/* --- SKELETON ANIMATION (Nomor 4) --- */
.skeleton-box {
    display: inline-block;
    height: 1em;
    position: relative;
    overflow: hidden;
    background-color: #e2e8f0;
    border-radius: 4px;
    width: 100%;
}

.skeleton-box::after {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
    content: '';
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

/* Transisi Halaman Halus */
body {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- FOOTER --- */

.auth-footer { text-align: center; padding-bottom: 30px; font-size: 14px; color: var(--text-muted); }

.auth-footer a { color: var(--primary-green); text-decoration: none; font-weight: 700; }



/* --- DASHBOARD STYLES (STABIL) --- */

.top-nav { display: flex; justify-content: space-between; align-items: center; padding: 20px; }

.hero-card { margin: 10px 20px 30px 20px; background: linear-gradient(135deg, #00b894, #007f5f); padding: 25px; border-radius: 24px; color: white; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.grid-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 10px; padding: 0 15px; }

.grid-item { text-decoration: none; display: flex; flex-direction: column; align-items: center; }

.icon-wrapper { width: 60px; height: 60px; background: #f0f7f4; border-radius: 18px; display: flex; justify-content: center; align-items: center; margin-bottom: 8px; }

.icon-wrapper i { font-size: 24px; color: var(--primary-green); }

.grid-item span { font-size: 9px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; text-align: center; }
