/* ==========================================================================
   1. VARIABLE WARNA ARTCRAFT & GLOBAL RESET
   ========================================================================== */
:root {
    --forest-dark: #233e28;
    --bamboo-mid: #6da044;
    --bamboo-light: #b8d186;
    --bg-body: #f4f7f4;
    --surface-white: #ffffff;
    --border-color: #dceedc;
    --text-main: #333333;
    --text-muted: #888888;
    --danger-red: #d32f2f;
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, #8bc34a 0%, #388e3c 100%); /* Hijau */
    --grad-danger: linear-gradient(135deg, #ff5252 0%, #b71c1c 100%);  /* Merah */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #e8eee8; /* Warna di luar bingkai HP */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Container Utama untuk semua halaman */
.mobile-container {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background-color: var(--forest-dark);
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

/* ==========================================================================
   2. STYLE HALAMAN LOGIN (index.html)
   ========================================================================== */
.header-section {
    position: relative;
    height: 35%;
    width: 100%;
}

.image-overlay {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--forest-dark);
}

.image-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7; 
    clip-path: ellipse(100% 80% at 50% 15%);
}

.welcome-text {
    text-align: center;
    color: white;
    padding: 0 20px;
    margin-top: -10px;
    margin-bottom: 30px;
}

.welcome-text h1 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.welcome-text p {
    font-size: 0.85rem;
    color: var(--bamboo-light);
    margin-top: 5px;
}

.form-card {
    background: var(--surface-white);
    margin: 0 25px;
    padding: 30px 25px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--forest-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    background-color: #fafafa;
    font-size: 1rem;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: var(--bamboo-mid);
    outline: none;
    background-color: #fff;
}

.password-wrapper { position: relative; }
.password-wrapper i {
    position: absolute; right: 15px; top: 50%;
    transform: translateY(-50%); color: #999; cursor: pointer;
}

.btn-login {
    width: 100%; padding: 16px;
    background: var(--grad-primary); border: none; border-radius: 12px;
    color: white; font-size: 1rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 8px 20px rgba(56, 142, 60, 0.3);
    display: flex; justify-content: center; align-items: center; gap: 12px;
}

/* ==========================================================================
   3. STYLE HALAMAN HOME (home.html)
   ========================================================================== */
.header-profile {
    padding: 45px 25px 35px;
    display: flex; justify-content: space-between; align-items: center;
    color: white;
}

.user-info { display: flex; align-items: center; gap: 15px; }
.avatar {
    width: 55px; height: 55px; border-radius: 50%;
    border: 2px solid var(--bamboo-light); object-fit: cover;
}

.user-text h3 { font-size: 1.1rem; font-weight: 700; }
.user-text p { font-size: 0.75rem; color: var(--bamboo-light); }

.logout-btn {
    color: white; font-size: 1.2rem; background: rgba(255, 255, 255, 0.15);
    padding: 10px; border-radius: 12px; text-decoration: none;
}

.main-content-wrapper {
    flex: 1; background-color: white;
    border-radius: 35px 35px 0 0; padding: 30px 20px;
}

.attendance-card {
    background: white; border-radius: 25px; text-align: center;
    padding: 25px 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border: 1px solid #f0f4f0; margin-bottom: 30px;
}

.clock-display { font-size: 2.8rem; font-weight: 800; color: var(--forest-dark); margin: 8px 0; }
.date-display { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }
.divider { height: 1px; background: #eee; margin: 20px 0; }
.office-time { font-size: 1.1rem; font-weight: 700; color: var(--forest-dark); }

.action-buttons { display: flex; gap: 15px; margin-top: 25px; }
.btn-action {
    flex: 1; padding: 16px; border: none; border-radius: 15px;
    color: white; font-weight: 700; font-size: 1rem; cursor: pointer;
    display: flex; justify-content: center; align-items: center;
}

.btn-in { background: var(--grad-primary); box-shadow: 0 6px 15px rgba(56, 142, 60, 0.25); }
.btn-out { background: var(--grad-danger); box-shadow: 0 6px 15px rgba(183, 28, 28, 0.25); }

/* History List */
.history-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; color: var(--forest-dark); }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid #f2f2f2; }
.h-date { font-size: 0.9rem; font-weight: 600; color: var(--text-main); }
.h-time { font-size: 0.85rem; color: #666; display: flex; align-items: center; gap: 6px; }
.h-time.late { color: var(--danger-red); font-weight: 700; }

/* ==========================================================================
   4. STYLE HALAMAN MAPS (clockin.html & clockout.html)
   ========================================================================== */
.map-section {
    height: 60%; width: 100%; position: relative;
    background-color: #e5e3df;
    background-image: url('https://user-images.githubusercontent.com/17855353/104217117-9195b600-542e-11eb-8c66-886866164f9b.png');
    background-size: cover; background-position: center;
}

.back-btn {
    position: absolute; top: 20px; left: 20px;
    width: 45px; height: 45px; background: white; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: var(--forest-dark); text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 10;
}

.time-overlay {
    position: absolute; top: 25px; width: 100%;
    text-align: center; font-weight: 700; font-size: 1.2rem;
    color: var(--forest-dark); text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

.bottom-sheet {
    position: absolute; bottom: 0; width: 100%; height: 50%;
    background: white; border-top-left-radius: 30px; border-top-right-radius: 30px;
    padding: 20px 25px; box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    display: flex; flex-direction: column;
}

.drag-handle { width: 40px; height: 4px; background: #e0e0e0; border-radius: 10px; margin: 0 auto 20px; }

.title-action { text-align: center; color: var(--forest-dark); font-weight: 700; margin-bottom: 25px; }
.title-action.out { color: var(--danger-red); } /* Khusus Clock Out */

.info-group { display: flex; gap: 15px; margin-bottom: 20px; }
.info-icon { color: var(--bamboo-mid); font-size: 1.2rem; padding-top: 5px; }
.info-text label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--forest-dark); margin-bottom: 4px; }
.info-text p { font-size: 0.9rem; color: #555; line-height: 1.4; }
.info-text textarea { width: 100%; border: none; border-bottom: 1px solid #eee; padding: 5px 0; outline: none; resize: none; }

/* Marker Animation */
.marker { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.pin { width: 20px; height: 20px; background: #d32f2f; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid white; }
.pulse { 
    width: 30px; height: 30px; background: rgba(211, 47, 47, 0.2); border-radius: 50%; 
    position: absolute; top: -5px; left: -5px; animation: pulsate 1.5s infinite; 
}

@keyframes pulsate {
    0% { transform: scale(0.1); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.btn-submit {
    margin-top: auto; width: 100%; padding: 16px;
    background: var(--grad-primary); border: none; border-radius: 15px;
    color: white; font-size: 1rem; font-weight: 700; cursor: pointer;
}

/* Tombol Submit Khusus Clock Out */
.btn-submit-out {
    margin-top: auto; width: 100%; padding: 16px;
    background: var(--grad-danger); border: none; border-radius: 15px;
    color: white; font-size: 1rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 8px 20px rgba(183, 28, 28, 0.3);
}

.btn-action:active, .btn-login:active, .btn-submit:active, .btn-submit-out:active {
    transform: scale(0.97);
}

/* Scrollbar Hidden */
::-webkit-scrollbar { width: 0px; }