/* =========================================
   MALL MANAGEMENT - EXTRA LARGE MOBILE STYLES
   ========================================= */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

/* BACKGROUND DENGAN OVERLAY AGAR FORM LEBIH KONTRAS */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bcp.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /* OVERLAY GELAP 40% agar form putih lebih menonjol */
    background-color: rgba(0, 0, 0, 0.4); 
    background-blend-mode: multiply;
    z-index: -1;
}

:root {
    --primary: #007bff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --dark: #343a40;
}

/* CONTAINER UTAMA */
.container, .login-box, .form-container {
    width: 100%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.98); /* Hampir solid putih agar sangat jelas */
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin: 0 auto;
}

.login-box, .form-container {
    max-width: 500px;
    padding: 40px 25px;
}

/* HEADER */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 1200px;
}
.header h2 { margin: 0; font-size: 22px; color: var(--dark); }
.nav-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* TOMBOL (UKURAN EXTRA LARGE) */
.btn {
    padding: 16px 24px; /* Padding sangat lega */
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    font-size: 18px !important; /* Font besar */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    color: white;
    min-height: 56px; /* Standar tinggi tombol mobile modern */
    width: 100%; /* Lebar penuh di HP */
}

.btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); }
.btn-success { background: var(--success); }
.btn-warning { background: var(--warning); color: #000; }
.btn-danger { background: var(--danger); }
.btn-info { background: var(--info); }
.btn-dark { background: var(--dark); }
.btn-secondary { background: #6c757d; }
.btn-sm { padding: 12px 16px; font-size: 15px !important; min-height: 48px; width: auto; }

/* FORM INPUT (UKURAN EXTRA LARGE) */
.form-group { margin-bottom: 24px; }
.form-group label { 
    display: block; 
    font-weight: 700; 
    margin-bottom: 8px; 
    color: #333; 
    font-size: 16px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%; 
    padding: 16px 20px; /* Ruang dalam sangat lega */
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 18px !important; /* WAJIB 18px agar iOS tidak auto-zoom */
    font-weight: 500;
    background: #fff;
    min-height: 56px;
    transition: all 0.2s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none; 
    border-color: var(--primary); 
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
}

/* STATISTIK */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    width: 100%;
}
.stat-card {
    background: #fff;
    padding: 20px 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 5px solid var(--primary);
}
.stat-card h3 { margin: 0; font-size: 32px; font-weight: 800; color: var(--dark); }
.stat-card p { margin: 8px 0 0; color: #666; font-size: 14px; font-weight: 600; }

/* TABEL (Scrollable di HP) */
.table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; min-width: 750px; font-size: 15px; }
th, td { padding: 16px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; color: #555; font-weight: 700; text-transform: uppercase; font-size: 13px; }

/* BADGES */
.badge, .status-badge { padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; display: inline-block; }
.badge-present, .status-active { background: #d4edda; color: #155724; }
.badge-late, .status-inactive { background: #f8d7da; color: #721c24; }

/* CARDS */
.task-card {
    background: #fff;
    padding: 20px; border-radius: 12px; margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-left: 6px solid var(--primary);
}
.task-card.completed { border-left-color: var(--success); }
.task-card.blocked { border-left-color: var(--danger); background: #fff5f5; }

/* MODAL */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); justify-content: center; align-items: center; z-index: 1000;
}
.modal-content {
    background: white; padding: 30px 25px; border-radius: 16px; width: 90%; max-width: 500px;
    max-height: 90vh; overflow-y: auto;
}

/* =========================================
    RESPONSIVE KHUSUS SMARTPHONE
    ========================================= */
@media (max-width: 768px) {
    body { 
        padding: 10px; 
        justify-content: flex-start; 
        padding-top: 15px;
    }
    
    .container, .login-box, .form-container { 
        padding: 25px 20px; 
        width: 100%; 
    }
    
    .header { 
        flex-direction: column; 
        align-items: flex-start; 
        padding: 20px;
    }
    
    /* Memaksa semua tombol utama menjadi lebar penuh di HP */
    .nav-buttons { 
        width: 100%; 
        flex-direction: column; 
    }
    
    .btn { 
        width: 100%; 
        margin-bottom: 10px;
        font-size: 18px !important;
        min-height: 56px;
    }
    
    .btn-sm { 
        width: auto; 
        display: inline-flex; 
        margin-bottom: 0; 
        font-size: 15px !important;
        min-height: 48px;
    }
    
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card h3 { font-size: 28px; }
    
    .form-group input, .form-group select, .form-group textarea {
        font-size: 18px !important; /* Anti auto-zoom iOS */
        padding: 18px 20px;
    }
}

@media print {
    body::before { display: none; }
    body { background: white; display: block; padding: 0; }
    .no-print, .btn, .nav-buttons, .header { display: none !important; }
    .container { box-shadow: none; background: white; }
}