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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1e3d73 0%, #0f1e3d 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .container { max-width: 720px; }
}

@media (min-width: 1024px) {
    .container { max-width: 900px; }
}

.card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(20, 30, 60, 0.18);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.6);
}

.header {
    background: linear-gradient(135deg, #1e3d73, #0f1e3d);
    color: white;
    text-align: center;
    padding: 24px 20px;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .header h1 { font-size: 28px; }
    .header p { font-size: 15px; }
}

form {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e3d73;
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

select, input[type="text"], input[type="date"], textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
    background: #f8f9fa;
    transition: all 0.3s;
    appearance: none;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: #1e3d73;
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 61, 115, 0.1);
}

.member-container {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0;
    background: #f8faff;
    margin-top: 8px;
    scrollbar-width: thin;
    scrollbar-color: #a0aec0 #edf2f7;
}

.member-container .group-header {
    position: sticky;
    top: 0;
    z-index: 2;
}

.member-container::-webkit-scrollbar {
    width: 6px;
}

.member-container::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 14px;
}

.member-container::-webkit-scrollbar-thumb {
    background: #a0aec0;
    border-radius: 14px;
}

.group-card {
    background: #ffffff;
    border: 1px solid #e0e7ff;
    border-radius: 14px;
    margin: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(30, 61, 115, 0.08);
}

.group-header {
    background: linear-gradient(135deg, #1e3d73, #2c5282);
    color: white;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-header input.group-checkbox {
    width: 18px;
    height: 18px;
}

.group-count {
    font-size: 12px;
    opacity: 0.9;
    font-weight: normal;
}

.member-list {
    padding: 8px 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 12px;
}

/* Grid for Job/Assessment simple lists */
#memberListJob,
#memberListAssessment {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 12px;
    padding: 12px;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    position: relative;
    border: 1px solid #e6eefb;
    border-radius: 10px;
    background: #fff;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.member-item:last-child { border-bottom: none; }

.member-item:hover {
    background: #f8faff;
    border-color: #cfe0ff;
    box-shadow: 0 2px 8px rgba(30, 61, 115, 0.08);
}

.member-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 24px;
    width: 24px;
    background-color: #e2e8f0;
    border-radius: 8px;
    margin-right: 12px;
    transition: all 0.3s;
    position: relative;
    flex-shrink: 0;
}

.member-item input:checked ~ .checkmark {
    background-color: #1e3d73;
    box-shadow: 0 0 0 3px rgba(30, 61, 115, 0.2);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.member-item input:checked ~ .checkmark:after {
    display: block;
}

.member-item .checkmark:after {
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.member-name {
    font-size: 15px;
    color: #2d3748;
    font-weight: 600;
}

.selected-info {
    margin-top: 12px;
    font-size: 14px;
    color: #1e3d73;
    font-weight: 600;
    text-align: center;
    background: #dbeafe;
    padding: 10px;
    border-radius: 10px;
    border: 1px dashed #93c5fd;
}

.info-box {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    color: #1e3d73;
    margin: 16px 0;
    border-left: 5px solid #28a745;
    font-weight: 500;
}

.divider {
    height: 1px;
    background: #edf2f7;
    margin: 20px 0;
}

/* ====== WP LIST STYLES ====== */
#wpListPanel table {
    width: 100%;
    border-collapse: separate !important; /* paksa agar border-spacing berfungsi */
    border-spacing: 0 10px !important; /* jarak antar baris sebagai sekat */
}

#wpListPanel thead th {
    background: #eef2ff;
    color: #1e3d73;
    font-weight: 700;
    border: 1px solid #dbe4ff;
    padding: 10px 12px;
}

#wpListPanel tbody tr {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 12px rgba(30,61,115,.08);
    transition: transform .15s ease, box-shadow .15s ease;
}

#wpListPanel tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(30,61,115,.12);
}

#wpListPanel tbody td {
    padding: 12px 14px !important;
    border-top: none !important;
    border-bottom: none !important;
    background: #ffffff !important;
}

#wpListPanel tbody tr td:first-child {
    border-radius: 12px 0 0 12px;
}

#wpListPanel tbody tr td:last-child {
    border-radius: 0 12px 12px 0;
}

/* Fallback separator untuk perangkat yang mengabaikan border-spacing */
#wpListPanel table[style*="border-collapse:collapse"] tbody tr + tr td,
#wpListPanel tbody tr + tr td {
    border-top: 1px solid #eaeef4 !important;
}

/* Zebra alternatif agar per-baris tetap terbaca di mobile */
#wpListPanel tbody tr:nth-child(odd) td { background-color: #fbfdff !important; }

#wpListPanel .badge,
#wpListPanel .label,
#wpListPanel .status {
    border-radius: 9999px;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 12px;
}

/* Status accents per-row */
#wpListPanel .wp-draft td { border-left: 4px solid #f59e0b; }
#wpListPanel .wp-approved td { border-left: 4px solid #22c55e; }
#wpListPanel .wp-rejected td { border-left: 4px solid #ef4444; }

/* Approve button style */
.approve-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    border: 1px solid #16a34a;
}
.approve-btn:hover { box-shadow: 0 4px 12px rgba(34,197,94,.35); }

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1e3d73, #0f1e3d);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

@media (max-width: 640px) {
    .submit-btn {
        position: sticky;
        bottom: 12px;
        box-shadow: 0 8px 20px rgba(30, 61, 115, 0.3);
        z-index: 5;
    }
}

.secondary-btn {
    display: inline-block;
    padding: 10px 14px;
    background: #eef2ff;
    color: #1e3d73;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: #e0e7ff;
    border-color: #b4c2ff;
}

.secondary-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.hint-text {
    margin-top: 6px;
    font-size: 12px;
    color: #475569;
}

.autocomplete {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    z-index: 20;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
}

/* Dalam panel pencarian, tampilkan list secara statis (bukan absolute) */
.search-panel .autocomplete-list {
    position: relative;
    top: 0;
    padding: 6px;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(15,23,42,.05);
    margin: 6px 0;
}

.autocomplete-item:hover {
    background: #f8fafc;
}

.autocomplete-title {
    font-size: 14px;
    color: #0f172a;
    font-weight: 600;
}

.autocomplete-sub {
    font-size: 12px;
    color: #475569;
}

.search-panel {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
}

.search-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    background: #f8fafc;
    transition: all .2s;
}

.search-input:focus {
    outline: none;
    border-color: #1e3d73;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30,61,115,.08);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 61, 115, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#result {
    margin-top: 20px;
}