/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #007bff; /* Biru utama */
    --primary-dark: #0056b3;  /* Biru lebih gelap */
    --secondary-color: #495057; /* Abu-abu gelap untuk header dashboard/filter */
    
    --header-table-color: #3f51b5; /* Warna header tabel jadwal (Biru Indigo) */
    --header-table-text: #ffffff;  /* Warna teks header tabel jadwal */

    --background-light: #f8f9fa; /* Latar belakang aplikasi */
    --text-dark: #343a40; /* Teks gelap */
    --text-muted: #6c757d; /* Teks muted */
    --border-color: #dee2e6; /* Warna border default */
    --shadow-light: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-medium: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15); /* Shadow lebih kuat */

    /* Warna spesifik untuk status ringkasan */
    --color-hadir: #28a745;       /* Hijau */
    --color-late: #dc3545;        /* Merah */
    --color-early: #ffc107;       /* Kuning/Oranye */
    --color-leave: #17a2b8;       /* Biru terang (Izin) */
    --color-sick: #6610f2;        /* Ungu (Sakit) */
    --color-oot: #007bff;         /* Biru (Luar Kota) */
    --color-holiday: #6f42c1;     /* Ungu gelap (Libur Nasional) */
    --color-day-off: #6c757d;     /* Abu-abu (Libur Mingguan) */
    --color-absent: #e44d26;      /* Oranye gelap (Tidak Absen) */
    --color-overtime: #20c997;    /* Teal (Lembur) */

    /* Warna untuk badge status jadwal */
    --badge-bg-day-off: var(--color-day-off);       /* Grey for day off */
    --badge-bg-flexible: var(--color-early);        /* Yellow/Orange for flexible */
    --badge-bg-assigned: var(--color-hadir);        /* Green for assigned shift */
    --badge-bg-no-schedule: var(--color-absent);    /* Darker orange for no schedule */

    /* Hover colors for tables */
    --table-hover-daily: #e0f2f7; /* Light blue hover for daily report */
    --table-hover-schedule: #e8eaf6; /* Light indigo hover for schedule tables */
}

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

html {
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 1.6rem; /* Default font size: 16px */
}

.container {
    max-width: 1200px;
    margin: 2rem auto; /* 20px */
    background-color: #fff;
    padding: 3rem; /* 30px */
    border-radius: 1.2rem; /* 12px */
    box-shadow: var(--shadow-medium);
    flex-grow: 1;
}

.header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 3rem; /* 20px 30px */
    text-align: center;
    border-radius: 1.2rem 1.2rem 0 0; /* 12px */
    margin: -3rem -3rem 2rem -3rem; /* -30px -30px 20px -30px */
    box-shadow: var(--shadow-light);
}
.header h1 {
    margin: 0;
    font-size: 2.8rem; /* 28px */
    font-weight: 600;
}
.header p {
    margin-top: 0.5rem; /* 5px */
    font-size: 1.4rem; /* 14px */
    opacity: 0.9;
}

/* --- Form Styles (Login & Filter) --- */
.auth-form, .filter-form {
    background-color: #fefefe;
    padding: 2.5rem; /* 25px */
    border-radius: 0.8rem; /* 8px */
    box-shadow: var(--shadow-light);
    margin-bottom: 3rem; /* 30px */
}

.auth-form {
    max-width: 450px;
    margin: 5rem auto; /* 50px */
    text-align: center;
}
.auth-form h2 {
    margin-top: 0;
    color: var(--text-dark);
    font-size: 2.2rem; /* 22px */
    margin-bottom: 2rem; /* 20px */
}
.auth-form label {
    display: block;
    text-align: left;
    margin-bottom: 0.8rem; /* 8px */
    font-weight: 500;
}
.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 1.2rem; /* 12px */
    margin-bottom: 1.5rem; /* 15px */
    border: 0.1rem solid var(--border-color); /* 1px */
    border-radius: 0.6rem; /* 6px */
    font-size: 1.6rem; /* 16px */
    transition: border-color 0.3s ease;
}
.auth-form input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 1.2rem 2.5rem; /* 12px 25px */
    border: none;
    border-radius: 0.6rem; /* 6px */
    cursor: pointer;
    font-size: 1.6rem; /* 16px */
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-0.2rem); /* -2px */
}
button:active {
    transform: translateY(0);
}

.error-message {
    color: var(--color-late);
    background-color: #f8d7da; /* light red */
    border: 0.1rem solid #f5c6cb; /* 1px */
    padding: 1rem; /* 10px */
    border-radius: 0.5rem; /* 5px */
    margin-top: 1.5rem; /* 15px */
    margin-bottom: 2rem; /* 20px */
    font-size: 1.4rem; /* 14px */
}

/* --- Dashboard Header --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem; /* 30px */
    border-bottom: 0.1rem solid var(--border-color); /* 1px */
    padding-bottom: 1.5rem; /* 15px */
    flex-wrap: wrap; 
    gap: 1.5rem; /* 15px */
}
.dashboard-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 2.rem; /* 20px */
    font-weight: 600;
}
.dashboard-header .welcome-info {
    font-size: 1.6rem; /* 16px */
    font-weight: 500;
    color: var(--text-dark);
}
.dashboard-header .logout-btn {
    background-color: var(--color-late);
    color: white;
    padding: 1rem 1.8rem; /* 10px 18px */
    border: none;
    border-radius: 0.6rem; /* 6px */
    text-decoration: none;
    font-size: 1.5rem; /* 15px */
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.dashboard-header .logout-btn:hover {
    background-color: #c82333;
    transform: translateY(-0.2rem); /* -2px */
}

/* --- Filter Form (Dashboard) - START IMPROVED --- */
.filter-form {
    background-color: var(--background-light); /* Latar belakang lebih terang */
    padding: 2rem; /* 20px */
    border-radius: 1rem; /* 10px */
    box-shadow: var(--shadow-light);
    margin-bottom: 3rem; /* 30px */
    border: 0.1rem solid var(--border-color);
}
.filter-form form { 
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem; /* 15px */
    align-items: flex-end; /* Align items to the bottom */
    width: 100%; 
}
.filter-group {
    flex: 1 1 20rem; /* Allow flexible width, min 200px */
    display: flex;
    flex-direction: column;
    min-width: 15rem; /* Agar tidak terlalu kecil di mobile */
}
.filter-group label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem; /* 5px */
    font-size: 1.4rem; /* 14px */
}
.input-with-icon {
    position: relative;
    display: flex; /* Untuk menempatkan ikon di dalam input */
    align-items: center;
}
.input-with-icon i {
    position: absolute;
    left: 1rem; /* 10px */
    color: var(--text-muted);
    font-size: 1.6rem; /* 16px */
    pointer-events: none; /* Agar tidak menghalangi klik pada input */
}
.filter-form input[type="date"] {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem; /* Padding kiri disesuaikan untuk ikon */
    border: 0.1rem solid var(--border-color); /* 1px */
    border-radius: 0.6rem; /* 6px */
    font-size: 1.6rem; /* 16px */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}
.filter-form input[type="date"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.filter-btn {
    background-color: #28a745; /* Hijau untuk filter */
    color: white;
    padding: 1rem 2rem; /* 10px 20px */
    border: none;
    border-radius: 0.6rem; /* 6px */
    cursor: pointer;
    font-size: 1.6rem; /* 16px */
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem; /* 8px */
    flex-shrink: 0; /* Jangan menyusut */
    min-width: 12rem; /* Lebar minimum untuk tombol */
    justify-content: center;
}
.filter-btn:hover {
    background-color: #218838;
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 0.8rem rgba(40, 167, 69, 0.2);
}
/* --- Filter Form (Dashboard) - END IMPROVED --- */


/* --- Summary Cards - START IMPROVED --- */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); /* 180px */
    gap: 2.5rem; /* 25px */
    margin-bottom: 4rem; /* 40px */
}
.card {
    background-color: #ffffff;
    padding: 2.5rem; /* 25px */
    border-radius: 1.2rem; /* Slightly more rounded */
    box-shadow: var(--shadow-medium); /* Stronger initial shadow */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 0.1rem solid var(--border-color); /* 1px */
    position: relative; /* For icon positioning */
    overflow: hidden; /* For background effects */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Space out content vertically */
    align-items: center;
}
.card:hover {
    transform: translateY(-0.7rem); /* Lebih naik */
    box-shadow: var(--shadow-strong); /* Shadow lebih kuat saat hover */
    border-color: var(--primary-color); /* Border color change on hover */
}
.card-icon {
    font-size: 3.5rem; /* Ukuran ikon */
    margin-bottom: 1.5rem; /* 15px */
    color: var(--primary-color); /* Warna ikon default */
    opacity: 0.7;
    transition: color 0.3s ease, opacity 0.3s ease;
}
.card:hover .card-icon {
    color: var(--primary-dark); /* Ubah warna ikon saat hover */
    opacity: 1;
}

/* Specific icon colors (matching card theme) */
.card.late .card-icon { color: var(--color-late); }
.card.early .card-icon { color: var(--color-early); }
.card.leave .card-icon { color: var(--color-leave); }
.card.sick .card-icon { color: var(--color-sick); }
.card.oot .card-icon { color: var(--color-oot); }
.card.holiday .card-icon { color: var(--color-holiday); }
.card.dayoff .card-icon { color: var(--color-day-off); }
.card.absent .card-icon { color: var(--color-absent); }
.card.overtime .card-icon { color: var(--color-overtime); }

.card h3 {
    margin-top: 0;
    font-size: 1.6rem; /* 16px */
    font-weight: 500;
    color: var(--text-dark); 
    line-height: 1.2; /* Better spacing */
}
.card p {
    font-size: 3.4rem; /* Lebih besar */
    font-weight: 700; /* Lebih tebal */
    margin: 1rem 0 0; /* 10px */
    color: var(--text-dark);
}
/* --- Summary Cards - END IMPROVED --- */


/* --- General Section Styling (for Daily Report, Holidays, Schedules) --- */
.schedule-section, .daily-report-section {
    margin-bottom: 4rem; /* 40px */
    padding-top: 1rem; /* 10px */
}
.schedule-section h3, .daily-report-section h3 {
    color: var(--text-dark);
    font-size: 2rem; /* 20px */
    font-weight: 600;
    margin-bottom: 2rem; /* 20px */
    border-bottom: 0.2rem solid var(--primary-color); /* 2px */
    padding-bottom: 1rem; /* 10px */
}

/* --- Table Wrappers & Table Styling --- */
.table-wrapper, .daily-report-table-wrapper {
    width: 100%; 
    overflow-x: auto; /* Memastikan scroll horizontal jika tabel terlalu lebar */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling di iOS */
    box-shadow: var(--shadow-light);
    border-radius: 0.8rem; /* 8px */
    margin-bottom: 2rem; /* 20px */
    border: 0.1rem solid var(--border-color); /* 1px */
}

/* Styling for the main DAILY attendance table */
.daily-report-table {
    width: 100%; 
    border-collapse: collapse;
    min-width: 55rem; /* Meningkatkan min-width */
    background-color: #fff;
    border-radius: 0.8rem; /* 8px */
    overflow: hidden; /* Untuk memastikan border-radius bekerja pada tabel */
}
.daily-report-table th, .daily-report-table td {
    border: 0.1rem solid var(--border-color); /* 1px */
    padding: 1.2rem 1.5rem; /* 12px 15px */
    text-align: left;
    vertical-align: top;
    white-space: nowrap; 
    font-size: 1.5rem; /* 15px */
}
.daily-report-table th {
    background-color: var(--primary-color); /* Header warna utama */
    color: white;
    font-weight: 600;
}
.daily-report-table tbody tr:nth-child(even) {
    background-color: #fefefe;
}
.daily-report-table tbody tr:hover {
    background-color: var(--table-hover-daily); /* Light blue hover for daily report */
    cursor: pointer;
}


/* --- START: Perbaikan Styling Fokus pada Tabel Jadwal (.data-table) --- */
.data-table {
    width: 100%; 
    border-collapse: collapse;
    min-width: 65rem; /* Lebih meningkatkan min-width agar lebih responsif di ukuran menengah */
    background-color: #fff;
    border-radius: 0.8rem; /* 8px */
    overflow: hidden; /* Penting untuk radius border pada tabel */
}
.data-table th, .data-table td {
    border: 0.1rem solid var(--border-color); /* 1px */
    padding: 1.2rem 1.5rem; /* 12px 15px */
    text-align: left;
    vertical-align: middle; /* Mengubah ke middle agar badge di tengah */
    white-space: nowrap; /* Memastikan teks dalam satu baris, scroll jika perlu */
    font-size: 1.5rem; /* 15px */
}
.data-table th {
    background-color: var(--header-table-color); /* Warna Biru Indigo yang lebih professional */
    color: var(--header-table-text);
    font-weight: 600;
    letter-spacing: 0.05rem; /* Sedikit spasi antar huruf */
    text-transform: uppercase; /* Huruf kapital untuk header */
}
.data-table tbody tr:nth-child(even) {
    background-color: #fcfcfc; /* Warna lebih terang untuk baris genap */
}
.data-table tbody tr:hover {
    background-color: var(--table-hover-schedule); /* Hover yang berbeda, light indigo */
    cursor: pointer;
}
/* --- END: Perbaikan Styling Fokus pada Tabel Jadwal (.data-table) --- */


/* Specific styling for report types within daily report table cells */
.status-holiday { background-color: #f3e8f8; color: var(--color-holiday); font-weight: 500; }
.status-out-of-town { background-color: #e8f5fb; color: var(--color-oot); font-weight: 500; }
.status-permission { background-color: #e0f7fa; color: var(--color-leave); font-weight: 500; } /* For Izin/Sakit */
.status-day-off { background-color: #eef1f3; color: var(--color-day-off); font-weight: 500; } /* For Libur Mingguan (daily report) */
.status-absent { background-color: #ffeae6; color: var(--color-absent); font-weight: 500; } /* For Tidak Absen Masuk/Pulang atau Tidak Ada Absensi */
.status-terlambat { color: var(--color-late); font-weight: 500; }
.status-pulang-awal { color: var(--color-early); font-weight: 500; }
.status-lembur { color: var(--color-overtime); font-weight: 500; }
.status-hadir { color: var(--text-dark); } 

/* General Badge Styling */
.badge {
    padding: 0.6rem 1rem; /* Meningkatkan padding */
    border-radius: 2rem; /* Bentuk pil/rounded lebih kuat */
    display: inline-block;
    white-space: nowrap;
    font-weight: 600; /* Lebih tebal */
    font-size: 1.3rem; /* Sedikit lebih kecil agar pas */
    text-align: center;
    min-width: 10rem; /* Memberikan lebar minimum agar konsisten */
    box-shadow: 0 0.1rem 0.2rem rgba(0,0,0,0.1); /* Sedikit bayangan untuk menonjolkan */
}

/* Specific badge colors for weekly schedule status */
.badge-day-off { 
    color: #fff; 
    background-color: var(--badge-bg-day-off); 
}
.badge-shift-flexible { 
    color: var(--text-dark); /* Teks gelap karena background kuning */
    background-color: var(--badge-bg-flexible); 
}
.badge-shift-assigned { 
    color: #fff; 
    background-color: var(--badge-bg-assigned); 
}
.badge-no-schedule { 
    color: #fff;
    background-color: var(--badge-bg-no-schedule);
}


/* Footer */
footer {
    text-align: center;
    padding: 2.5rem; /* 25px */
    margin-top: auto;
    color: var(--text-muted);
    font-size: 1.4rem; /* 14px */
}

/* --- Responsive Adjustments --- */

/* Small screens (less than 992px, typically tablets in landscape) */
@media (max-width: 99.2rem) { /* 992px */
    .container {
        margin: 1.5rem; /* 15px */
        padding: 2.5rem; /* 25px */
    }
    .header {
        padding: 1.8rem 2.5rem; /* 18px 25px */
        margin: -2.5rem -2.5rem 1.8rem -2.5rem; /* Adjust to container padding */
    }
    .header h1 {
        font-size: 2.4rem; /* 24px */
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem; /* 12px */
    }
    .dashboard-header h2 {
        font-size: 1.8rem; /* 18px */
    }
    .dashboard-header .welcome-info {
        font-size: 1.5rem; /* 15px */
    }
    .dashboard-header .logout-btn {
        width: auto; 
        align-self: flex-end; 
        font-size: 1.4rem; /* 14px */
        padding: 0.8rem 1.5rem; /* 8px 15px */
    }
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); /* 140px */
        gap: 2rem; /* 20px */
    }
    .card { padding: 2rem; }
    .card-icon { font-size: 3rem; margin-bottom: 1rem; }
    .card h3 {
        font-size: 1.4rem; /* 14px */
    }
    .card p {
        font-size: 3rem; /* 30px */
    }
    .schedule-section h3, .daily-report-section h3 {
        font-size: 1.8rem; /* 18px */
    }
    .data-table th, .data-table td,
    .daily-report-table th, .daily-report-table td {
        padding: 1rem 1.2rem; /* 10px 12px */
        font-size: 1.4rem; /* 14px */
    }
    .badge {
        font-size: 1.2rem; /* 12px */
        padding: 0.5rem 0.9rem; /* Lebih kecil */
        min-width: 8rem; /* Disesuaikan */
    }
    /* Filter responsive adjustments */
    .filter-group { flex: 1 1 18rem; }
    .filter-form input[type="date"] { font-size: 1.5rem; padding: 0.9rem 0.9rem 0.9rem 3.2rem;}
    .filter-form i { font-size: 1.5rem; }
    .filter-btn { font-size: 1.5rem; padding: 0.9rem 1.8rem; min-width: 11rem; }
}

/* Extra small screens (less than 768px, typically phones in landscape/portrait) */
@media (max-width: 76.8rem) { /* 768px */
    body {
        font-size: 1.5rem; /* 15px */
    }
    .container {
        margin: 1rem; /* 10px */
        padding: 2rem; /* 20px */
    }
    .header {
        padding: 1.5rem 2rem; /* 15px 20px */
        margin: -2rem -2rem 1.5rem -2rem; /* Adjust to container padding */
    }
    .header h1 {
        font-size: 2.2rem; /* 22px */
    }
    .header p {
        font-size: 1.3rem; /* 13px */
    }
    .auth-form {
        margin: 3rem 1rem; /* 30px 10px */
        padding: 2rem; /* 20px */
    }
    .auth-form h2 {
        font-size: 2rem; /* 20px */
    }
    .auth-form label {
        font-size: 1.5rem; /* 15px */
    }
    .auth-form input[type="text"],
    .auth-form input[type="password"] {
        font-size: 1.5rem; /* 15px */
        padding: 1rem; /* 10px */
    }
    /* Filter responsive adjustments */
    .filter-form form {
        flex-direction: column; /* Stack filter items vertically */
        align-items: stretch; /* Stretch to full width */
        gap: 1rem; /* 10px */
    }
    .filter-group { flex: none; width: 100%; }
    .filter-form input[type="date"] { 
        width: 100%; 
        min-width: unset;
        font-size: 1.5rem; 
        padding: 0.9rem 0.9rem 0.9rem 3.2rem;
    }
    .filter-btn {
        width: 100%; /* Make button full width */
        min-width: unset;
        font-size: 1.5rem;
        padding: 0.9rem 1.8rem;
    }
    .dashboard-header h2 {
        font-size: 1.6rem; /* 16px */
    }
    .dashboard-header .welcome-info {
        font-size: 1.4rem; /* 14px */
    }
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); /* 100px - even smaller cards */
        gap: 1.5rem; /* 15px */
    }
    .card { padding: 1.5rem; }
    .card-icon { font-size: 2.8rem; margin-bottom: 0.8rem; }
    .card h3 {
        font-size: 1.3rem; /* 13px */
    }
    .card p {
        font-size: 2.5rem; /* 25px */
    }
    .schedule-section h3, .daily-report-section h3 {
        font-size: 1.6rem; /* 16px */
    }
    /* Critical: Set min-width for all tables explicitly in this breakpoint */
    .data-table {
        min-width: 50rem; /* 500px, Ensure scroll if needed for schedule tables */
    }
    .daily-report-table {
        min-width: 45rem; /* 450px, Ensure scroll if needed for daily report */
    }
    .data-table th, .data-table td,
    .daily-report-table th, .daily-report-table td {
        padding: 0.8rem 1rem; /* 8px 10px */
        font-size: 1.4rem; /* 14px */
    }
    .badge {
        font-size: 1.0rem; /* 10px */
        padding: 0.35rem 0.7rem; /* Lebih kecil */
        min-width: 7rem; /* Disesuaikan */
    }
    footer {
        font-size: 1.3rem; /* 13px */
        padding: 2rem; /* 20px */
    }
}

/* Very small screens (less than 576px, typically portrait phones) */
@media (max-width: 57.6rem) { /* 576px */
    body {
        font-size: 1.4rem; /* 14px */
    }
    .container {
        margin: 0.5rem; /* 5px */
        padding: 1.5rem; /* 15px */
    }
    .header {
        padding: 1.2rem 1.5rem; /* 12px 15px */
        margin: -1.5rem -1.5rem 1.2rem -1.5rem; /* Adjust to container padding */
    }
    .header h1 {
        font-size: 1.8rem; /* 18px */
    }
    .auth-form {
        margin: 2rem 0.5rem; /* 20px 5px */
        padding: 1.5rem; /* 15px */
    }
    .auth-form h2 {
        font-size: 1.6rem; /* 16px */
    }
    .summary-cards {
        grid-template-columns: 1fr; /* Stack cards vertically */
        gap: 1rem; /* 10px */
    }
    .card { padding: 1.2rem; }
    .card-icon { font-size: 2.5rem; margin-bottom: 0.6rem; }
    .card h3 {
        font-size: 1.4rem; /* 14px */
    }
    .card p {
        font-size: 2.2rem; /* 22px */
    }
    .schedule-section h3, .daily-report-section h3 {
        font-size: 1.5rem; /* 15px */
    }
    /* Tables need aggressive min-width to prevent content crunching, relies on overflow-x */
    .data-table {
        min-width: 40rem; /* 400px, for schedule tables */
    }
    .daily-report-table {
        min-width: 38rem; /* 380px, for daily report table */
    }
    .data-table th, .data-table td,
    .daily-report-table th, .daily-report-table td {
        padding: 0.7rem 0.9rem; /* 7px 9px */
        font-size: 1.3rem; /* 13px */
    }
    .badge {
        font-size: 0.9rem; /* 9px */
        padding: 0.3rem 0.6rem; /* Lebih kecil */
        min-width: 6rem; /* Disesuaikan */
    }
    footer {
        font-size: 1.2rem; /* 12px */
        padding: 1.5rem; /* 15px */
    }
}

/* Tiny screens (less than 375px, e.g., iPhone SE 1st gen) */
@media (max-width: 37.5rem) { /* 375px */
    body {
        font-size: 1.3rem; /* 13px */
    }
    .container {
        padding: 1rem; /* 10px */
    }
    .header {
        padding: 1rem; /* 10px */
        margin: -1rem -1rem 1rem -1rem; /* Adjust to container padding */
    }
    .header h1 {
        font-size: 1.8rem; /* 18px */
    }
    .auth-form, .filter-form {
        padding: 1.5rem; /* 15px */
    }
    .auth-form h2 {
        font-size: 1.6rem; /* 16px */
    }
    .data-table, .daily-report-table {
        min-width: 30rem; /* 300px, Absolute minimum to avoid layout breaking, rely on scroll */
    }
    .data-table th, .data-table td,
    .daily-report-table th, .daily-report-table td {
        padding: 0.5rem 0.7rem; /* 5px 7px */
        font-size: 1.2rem; /* 12px */
    }
    .badge {
        font-size: 0.8rem; /* 8px */
        padding: 0.2rem 0.4rem; /* Lebih kecil */
        min-width: 5rem; /* Disesuaikan */
    }
    footer {
        font-size: 1.1rem; /* 11px */
        padding: 1rem; /* 10px */
    }
}