/* RESET */
* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    margin: 0;
    background: #f4f6f8;
    color: #333;
}

/* HEADER */
.header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header select {
    padding: 8px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
}

.saldo {
    font-weight: bold;
    margin-top: 4px;
}

/* MAIN */
main {
    padding: 12px;
    padding-bottom: 120px; /* ruang footer */
}

/* FORM */
.form-group {
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #555;
}

input, select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
}

/* QUICK ITEM */
.quick-items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.quick-items button {
    background: #e3f2fd;
    border: 1px solid #1e88e5;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

/* TABLE */
table {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: visible; /* ✅ WAJIB */
    border-collapse: collapse;
    margin-bottom: 10px;
}


thead {
    background: #eaeaea;
}

th, td {
    padding: 8px;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
}

td input {
    font-size: 13px;
    padding: 6px;
}

/* BUTTONS */
button {
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 15px;
    cursor: pointer;
}

#addItem {
    background: #eeeeee;
    width: 100%;
}

/* FOOTER */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border-top: 1px solid #ccc;
}

.footer div {
    grid-column: span 2;
    font-weight: bold;
    font-size: 16px;
}

#simpan {
    background: #1e88e5;
    color: white;
}

#tutupHari {
    background: #e53935;
    color: white;
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
}

.modal.hidden {
    display: none;
}

.modal-box {
    background: white;
    width: 92%;
    max-width: 360px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 16px;
    border-radius: 14px;
}

.modal-box h3 {
    text-align: center;
    margin-top: 0;
}

.modal-box label {
    font-size: 13px;
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

.modal-box input {
    margin-top: 6px;
}

.modal-box button {
    margin-top: 10px;
    width: 100%;
}

.autocomplete {
    position: relative;
}

.suggestion-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    max-height: 160px;
    overflow-y: auto;
    z-index: 9999; /* INI PENTING */
}


.suggestion-box div {
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
}

.suggestion-box div:hover {
    background: #e3f2fd;
}

.hidden {
    display: none !important;
}

.header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
}


.header-logo {
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo img {
    background: transparent;
    border-radius: 50%; /* opsional, kalau mau bulat rapi */
    height: 36px;       /* kecilkan, bisa 30–40px */
    width: auto;
    object-fit: contain;
}
.header-info {
    padding-left: 10px;     /* biar gak nempel logo */
    font-size: 13px;        /* kecilin dikit */
    line-height: 1.4;
}

.header-info #todayDate {
    font-size: 12px;
    opacity: 0.9;
}

.header-info .saldo {
    font-size: 13px;
    font-weight: 600;
}

.btn-owner {
    background: #ffca28;
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.btn-owner:active {
    transform: scale(0.96);
}

.header-karyawan select {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
}

.btn-setting {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    background: #1976d2;
    color: white;
    cursor: pointer;
}

.btn-setting:hover {
    background: #1565c0;
}

.btn-cancel {
    width: 100%;
    padding: 10px;
    background: #aaa;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}


/* PRINT */
@media print {
    body {
        background: #fff;
    }
}
