/* --- 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{
    background:linear-gradient(
        135deg,
        #111827,
        #1f2937
    );
    color:#fff;
    padding:18px 24px;
    font-size:20px;
    font-weight:700;
    text-align:center;
    letter-spacing:.5px;

    box-shadow:
        0 4px 20px rgba(0,0,0,.15);
}

/* --- 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); }
}

/* Dashboard */
.dashboard-container{
    padding:20px;
}

.dashboard-header{
    text-align:center;
    margin-bottom:30px;
}

.dashboard-header h1{
    font-size:32px;
    font-weight:700;
    color:#1f2937;
    margin-bottom:8px;
}

.dashboard-header p{
    color:#6b7280;
    font-size:15px;
}

.dashboard-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:20px;
}

/* Card */
.dashboard-card{
    position:relative;
    overflow:hidden;
    display:flex;
    align-items:center;
    gap:20px;
    padding:28px;
    border-radius:24px;
    text-decoration:none;
    color:#fff;
    min-height:180px;

    backdrop-filter:blur(10px);

    transition:all .35s ease;
    box-shadow:
        0 10px 30px rgba(0,0,0,.15);
}

.dashboard-card:hover{
    transform:translateY(-8px);
    box-shadow:
        0 20px 40px rgba(0,0,0,.25);
}

/* Efek glow */
.dashboard-card::before{
    content:'';
    position:absolute;
    width:180px;
    height:180px;
    border-radius:50%;
    background:rgba(255,255,255,.15);
    top:-50px;
    right:-50px;
}

/* Slip */
.dashboard-card.slip{
    background:linear-gradient(
        135deg,
        #2563eb,
        #1d4ed8
    );
}

/* Kwitansi */
.dashboard-card.kwitansi{
    background:linear-gradient(
        135deg,
        #10b981,
        #059669
    );
}

/* Icon */
.card-icon{
    width:80px;
    height:80px;
    flex-shrink:0;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:20px;

    background:rgba(255,255,255,.18);
}

.card-icon i{
    font-size:36px;
}

/* Content */
.card-content{
    flex:1;
}

.card-content h2{
    font-size:24px;
    margin-bottom:8px;
    font-weight:700;
}

.card-content p{
    font-size:14px;
    line-height:1.6;
    opacity:.9;
}

/* Arrow */
.card-arrow{
    font-size:24px;
    opacity:.8;
    transition:.3s;
}

.dashboard-card:hover .card-arrow{
    transform:translateX(6px);
}

/* Card Form */
.card-form{
    background:#fff;
    padding:24px;
    border-radius:18px;
    box-shadow:0 4px 20px rgba(0,0,0,.08);
    max-width:800px;
    margin:20px auto;
}

.card-form h2{
    margin:0 0 25px;
    font-size:24px;
    font-weight:600;
    color:#1f2937;
}

/* Form Group */
.form-group{
    margin-bottom:18px;
}

.form-group label{
    display:block;
    margin-bottom:8px;
    font-size:14px;
    font-weight:600;
    color:#374151;
}

/* Input & Textarea */
.form-group input,
.form-group textarea{
    width:100%;
    padding:12px 14px;
    border:1px solid #d1d5db;
    border-radius:10px;
    font-size:14px;
    font-family:inherit;
    box-sizing:border-box;
    transition:.25s;
    background:#fff;
}

.form-group textarea{
    resize:vertical;
    min-height:80px;
}

.form-group input:focus,
.form-group textarea:focus{
    outline:none;
    border-color:#10b981;
    box-shadow:0 0 0 4px rgba(16,185,129,.12);
}

/* Button */
.btn-primary{
    width:100%;
    border:none;
    border-radius:12px;
    padding:14px;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    color:#fff;
    background:linear-gradient(
        135deg,
        #10b981,
        #059669
    );
    transition:.3s;
}

.btn-primary:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(16,185,129,.25);
}

/* Card */
.table-card{
    background:#fff;
    border-radius:18px;
    padding:20px;
    box-shadow:0 4px 20px rgba(0,0,0,.08);
}

/* Header */
.table-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.table-header h2{
    margin:0;
    font-size:24px;
    color:#1f2937;
}

/* Tombol Tambah */
.btn-tambah{
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:#10b981;
    color:#fff;
    text-decoration:none;
    padding:10px 16px;
    border-radius:10px;
    font-size:14px;
    font-weight:600;
    transition:.3s;
}

.btn-tambah:hover{
    background:#059669;
    transform:translateY(-2px);
}

/* Responsive Table */
.table-responsive{
    overflow-x:auto;
}

/* Table */
.modern-table{
    width:100%;
    border-collapse:collapse;
    min-width:700px;
}

.modern-table thead{
    background:#f3f4f6;
}

.modern-table th{
    padding:14px;
    text-align:left;
    color:#374151;
    font-size:14px;
    font-weight:600;
}

.modern-table td{
    padding:14px;
    border-top:1px solid #f1f5f9;
    color:#374151;
}

.modern-table tbody tr{
    transition:.2s;
}

.modern-table tbody tr:hover{
    background:#f9fafb;
}

/* Nominal */
.nominal{
    font-weight:700;
    color:#059669;
}

/* Tombol Cetak */
.btn-cetak{
    display:inline-flex;
    align-items:center;
    gap:6px;
    text-decoration:none;
    background:#2563eb;
    color:#fff;
    padding:8px 12px;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
    transition:.3s;
}

.btn-cetak:hover{
    background:#1d4ed8;
}

/* Mobile */
@media(max-width:768px){

    .table-header{
        flex-direction:column;
        gap:15px;
        align-items:stretch;
    }

    .btn-tambah{
        justify-content:center;
    }

}

.aksi-group{
    display:flex;
    gap:8px;
}

.btn-cetak,
.btn-edit,
.btn-hapus{
    width:38px;
    height:38px;
    border:none;
    border-radius:10px;

    display:flex;
    align-items:center;
    justify-content:center;

    text-decoration:none;
    cursor:pointer;

    transition:.25s;
}

.btn-cetak{
    background:#2563eb;
    color:#fff;
}

.btn-cetak:hover{
    background:#1d4ed8;
}

.btn-edit{
    background:#f59e0b;
    color:#fff;
}

.btn-edit:hover{
    background:#d97706;
}

.btn-hapus{
    background:#ef4444;
    color:#fff;
}

.btn-hapus:hover{
    background:#dc2626;
}

.logo-preview{
    margin-top:15px;
}

.logo-preview img{
    max-width:180px;
    max-height:100px;
    border-radius:10px;
    border:1px solid #ddd;
    padding:10px;
    background:#fff;
}

.action-group{
    display:flex;
    gap:10px;
    margin-top:20px;
}

.btn-secondary{
    background:#374151;
    color:#fff;
    text-decoration:none;
    padding:14px 20px;
    border-radius:12px;
    font-weight:600;
}

.receipt{
    width: 180mm;
    min-height: 95mm;

    margin: 20px auto;
    padding: 20px 25px;

    background: #fff;
    border-radius: 12px;
}

/* HEADER */

.receipt-header{

    display:flex;
    justify-content:space-between;
    align-items:flex-start;

    padding:35px 40px;

    border-bottom:2px solid #c9a86a;
}

.receipt::before{

    content:"";

    position:absolute;

    inset:0;

    background:url('../uploads/logo.png');

    background-repeat:no-repeat;

    background-position:center;

    background-size:280px;

    opacity:.03;

    pointer-events:none;
}

.company{
    display:flex;
    align-items:center;
    gap:15px;
}

.company img{
    width:70px;
    height:70px;
    object-fit:contain;
}

.company h2{
    margin:0;
    font-size:22px;
    color:#111827;
}

.company p{
    margin:4px 0;
    color:#6b7280;
    font-size:13px;
}

.receipt-number{

    text-align:right;
}

.receipt-number h1{

    margin:0;

    font-size:32px;

    letter-spacing:5px;

    color:#1f2937;

    font-weight:300;
}

.receipt-number span{

    color:#c9a86a;

    font-weight:600;
}

.company h2,
.receipt-number h1{

    font-family:
    'Cormorant Garamond',
    serif;
}

/* BODY */

.receipt-body{
    padding:30px;
}

.field{
    margin-bottom:18px;
}

.field label{
    display:block;
    font-size:12px;
    color:#6b7280;
    margin-bottom:5px;
}

.field .value{
    font-size:15px;
    color:#111827;
}

.amount-box{

    text-align:right;

    padding:30px 0;

    margin:30px 0;

    border-top:1px solid #e5e7eb;
    border-bottom:1px solid #e5e7eb;
}

.amount-box h1{

    margin:0;

    font-size:48px;

    color:#c9a86a;

    font-weight:700;
    letter-spacing:1px;
}

.terbilang{

    background:#faf9f7;

    padding:18px;

    border-left:3px solid #c9a86a;

    font-style:italic;

    color:#4b5563;
}

.note{
    color:#6b7280;
    font-size:13px;
}

/* FOOTER */

.receipt-footer{

    display:flex;

    justify-content:space-between;

    align-items:flex-end;

    padding:30px;

    border-top:1px solid #e5e7eb;
}

.signature{

    width:260px;

    text-align:center;
}

.signature .line{

    margin-top:90px;

    border-top:1px solid #1f2937;
}

.date{
    color:#6b7280;
}

.btn-pdf{
    display:inline-flex;
    align-items:center;
    gap:6px;

    padding:8px 12px;

    border-radius:8px;

    background:#dc2626;
    color:white;

    text-decoration:none;

    font-size:13px;
}

.btn-pdf:hover{
    background:#b91c1c;
}


@media print{

    .receipt{
        width:190mm;
        min-height:85mm;
        box-shadow:none;
    }

}

/* Mobile */
@media(max-width:768px){

    .card-form{
        margin:10px;
        padding:18px;
    }

    .card-form h2{
        font-size:20px;
    }

}



/* Mobile */
@media(max-width:768px){

    .dashboard-card{
        flex-direction:column;
        text-align:center;
        min-height:auto;
    }

    .card-arrow{
        display:none;
    }

}





/* RESPONSIVE */
@media(min-width: 900px){
    .container { max-width: 900px; margin: 70px auto; }
    .bottom-nav { height: 70px; }
    .bottom-nav i { font-size: 22px; }
}
