/* ==========================================================
 * Style Utama - Sistem Verifikasi Ketidaklengkapan Berkas RM
 * ========================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f1f7f6;
    color: #1f2937;
    padding: 20px;
    font-size: 14px;
    line-height: 1.5;
}

/* Header */
.header {
    margin-bottom: 24px;
}

.header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.header p {
    font-size: 14px;
    color: #6b7280;
}

/* Navigasi */
.nav-bar {
    margin-bottom: 20px;
}

.nav-bar a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4b5563;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.nav-bar a:hover {
    background-color: #374151;
}

/* Control Bar (Index) */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 280px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.btn-add {
    background-color: #0d9488;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-add:hover {
    background-color: #0f766e;
}

/* Container Tabel */
.table-container {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

th {
    background-color: #f9fafb;
    color: #374151;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f9fafb;
}

/* Form Input & Select dalam Tabel */
td input[type="text"],
td input[type="date"],
td select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    color: #1f2937;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}

td input[type="text"]:focus,
td input[type="date"]:focus,
td select:focus {
    border-color: #0d9488;
}

/* Badge Jenis Pelayanan & Formulir */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
}

.badge-rawat-inap { background-color: #e0e7ff; color: #3730a3; }
.badge-triase { background-color: #fef3c7; color: #92400e; }
.badge-asesmen { background-color: #fee2e2; color: #991b1b; }
.badge-resume { background-color: #d1fae5; color: #065f46; }
.badge-cppt { background-color: #e0f2fe; color: #075985; }
.badge-penunjang { background-color: #f3e8ff; color: #6b21a8; }
.badge-administratif { background-color: #e5e7eb; color: #374151; }
.badge-kebidanan { background-color: #fce7f3; color: #9d174d; }
.badge-neonatus { background-color: #cffafe; color: #155e75; }
.badge-lain { background-color: #f5f5f4; color: #57534e; }

/* Status Styles */
.status-select {
    font-weight: 600;
}

.status-pending, .status-belum { background-color: #fee2e2 !important; color: #991b1b !important; }
.status-sebagian, .status-proses { background-color: #fef3c7 !important; color: #92400e !important; }
.status-selesai { background-color: #d1fae5 !important; color: #065f46 !important; }

/* Upload File & Lampiran Tag */
.upload-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-upload-btn {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f3f4f6;
    border: 1px dashed #9ca3af;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #4b5563;
    text-align: center;
    transition: background-color 0.2s;
}

.file-upload-btn:hover {
    background-color: #e5e7eb;
}

.uploaded-file-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 11px;
}

.uploaded-file-tag a {
    color: #0f766e;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.uploaded-file-tag a:hover {
    text-decoration: underline;
}

.btn-remove-file {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    border-radius: 50%;
}

.btn-remove-file:hover {
    background-color: #fee2e2;
}

/* Tombol Hapus Tong Sampah */
.btn-delete {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.btn-delete:hover {
    background-color: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.btn-delete svg {
    width: 15px;
    height: 15px;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    font-size: 14px;
    color: #4b5563;
}

.pagination {
    display: flex;
    gap: 5px;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
}

.pagination a:hover {
    background-color: #f3f4f6;
}

.pagination .active {
    background-color: #0d9488;
    color: #ffffff;
    border-color: #0d9488;
}

.pagination .disabled {
    color: #9ca3af;
    pointer-events: none;
    background-color: #f9fafb;
}

/* Filter Card (Laporan) */
.filter-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.form-group input, .form-group select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

/* Summary Cards (Laporan) */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 15px 20px;
    border-left: 5px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.summary-card.total { border-left-color: #3b82f6; }
.summary-card.selesai { border-left-color: #10b981; }
.summary-card.proses { border-left-color: #f59e0b; }
.summary-card.belum { border-left-color: #ef4444; }

.summary-card h3 {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card p {
    margin: 5px 0 0 0;
    font-size: 24px;
    font-weight: bold;
    color: #111827;
}

/* Media Print (Mode Cetak) */
@media print {
    .controls, .nav-bar, .filter-card, .btn-print, .btn-excel, .btn-reset, .file-upload-btn, .btn-delete, .pagination-container {
        display: none !important;
    }
    
    body {
        background: white;
        margin: 0;
        padding: 0;
    }

    .header h1 { font-size: 18px; }
    .header p { font-size: 12px; }

    .table-container {
        box-shadow: none;
        border: none;
    }

    table {
        width: 100% !important;
        font-size: 10px;
        border-collapse: collapse;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 4px !important;
    }
}