/* --- RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f5f6fa;
    color: #333;
    padding-bottom: 70px; /* ruang untuk bottom menu */
}

/* --- HEADER --- */
.header {
    width: 100%;
    background: #1f2937;
    padding: 18px 20px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
}

/* --- MAIN CONTENT --- */
.container {
    margin-top: 70px;
    padding: 20px;
}

/* Card Style */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* --- BOTTOM NAV --- */
.bottom-nav {
    width: 100%;
    height: 65px;
    background: #ffffff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 20;
}

.bottom-nav a {
    text-decoration: none;
    color: #6b7280;
    text-align: center;
    font-size: 13px;
    flex-grow: 1;
    padding: 8px 0;
    transition: .25s;
}

.bottom-nav a.active,
.bottom-nav a:hover {
    color: #2563eb;
}

.bottom-nav i {
    font-size: 20px;
    margin-bottom: 3px;
    display: block;
}

/* ============================
   FORM INPUT STYLING
   ============================ */

.input-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.input-group input,
.input-group select {
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    background: #ffffff;
    transition: 0.25s;
}

/* Fokus input */
.input-group input:focus,
.input-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    outline: none;
}

/* CARD SECTION CUSTOM */
.card h3 {
    margin-bottom: 10px;
    color: #1f2937;
}

/* Hasil Gaji */
#gaji_diterima {
    font-weight: bold;
    letter-spacing: 1px;
}

/* Dropdown search result */
#resultKaryawan .item:hover {
    background: #f3f4f6;
}

/* Container */
.page-container {
    padding: 20px;
    margin-bottom: 80px;
}

/* FILTER */
.filter-container {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 14px;
    margin-bottom: 5px;
}

.filter-group input,
.filter-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.btn-filter {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 11px 18px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 5px;
    align-items: center;
    font-size: 14px;
}
.btn-filter:hover {
    background: #0069d9;
}

/* TABEL */
.table-slip {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
     display: block;
    overflow-x: auto;
}

.table-slip th {
    background: #007bff;
    color: #fff;
    padding: 12px;
    text-align: left;
}

.table-slip td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.table-slip tr:hover {
    background: #f5f7ff;
}

/* Tombol */
.btn-pdf, .btn-edit, .btn-del {
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.btn-pdf { background: #dc3545; color: #fff; }
.btn-edit { background: #17a2b8; color: #fff; }
.btn-del { background: #343a40; color: #fff; }
.btn-pdf:hover { background: #b52d39; }
.btn-edit:hover { background: #138496; }
.btn-del:hover { background: #23272b; }

.loading, .error {
    margin-top: 20px;
    text-align: center;
    color: #555;
}


/* ============================
   RESPONSIVE FORM
   ============================ */
@media (min-width: 600px) {
    .input-group {
        max-width: 400px;
    }
}

/* Card border left accent */
.card.blue-accent {
    border-left: 4px solid #2563eb;
}
.card.red-accent {
    border-left: 4px solid #dc2626;
}

/* Styling untuk item karyawan */
#resultKaryawan {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#resultKaryawan .item {
    font-size: 14px;
}

.btn-submit {
    width: 100%;
    background: #0a4a72;
    color: white;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit i {
    font-size: 18px;
}

.btn-submit:hover {
    background: #0d5f94;
    transform: translateY(-2px);
}

.btn-submit:active {
    background: #083a55;
    transform: scale(0.98);
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* Tambahkan agar bisa scroll jika modal lebih tinggi dari viewport */
    padding: 20px; /* beri padding supaya modal tidak menempel ke tepi */
}

.modal-content {
    background: #fff;
    width: 450px;
    max-height: 90vh; /* maksimal tinggi 90% viewport */
    padding: 20px;
    border-radius: 12px;
    animation: fadeIn .3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    overflow-y: auto; /* scroll internal jika konten melebihi tinggi */
}

.close {
    float: right;
    font-size: 22px;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 6px 0 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.btn-save {
    width: 100%;
    padding: 12px;
    background: #3498db;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.btn-save:hover {
    background: #217dbb;
}

.card-catatan {
    background: #ffffff;
    padding: 15px;
    margin-top: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom:  15px;
}

.card-catatan h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: bold;
}

.card-catatan textarea {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
    font-size: 14px;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}





/* RESPONSIVE */
@media(min-width: 900px){
    .container { max-width: 900px; margin: 70px auto; }
    .bottom-nav { height: 70px; }
    .bottom-nav i { font-size: 22px; }
}
