@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Inter", sans-serif;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #7c3aed 0%, #4338ca 35%, #0f172a 100%);
    color: #0f172a;
    padding: 32px 24px;
}

/* Scrollbar halaman — selaras tone ungu / navy body */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(129, 140, 248, 0.95) rgba(15, 23, 42, 0.55);
}
html::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}
html::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(30, 27, 75, 0.5) 50%, rgba(15, 23, 42, 0.55) 100%);
    border-radius: 999px;
}
html::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c4b5fd 0%, #818cf8 35%, #6366f1 70%, #4f46e5 100%);
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ddd6fe 0%, #a5b4fc 45%, #6366f1 100%);
    border-color: rgba(15, 23, 42, 0.35);
}
html::-webkit-scrollbar-corner {
    background: rgba(15, 23, 42, 0.45);
}

.container { max-width: 1360px; margin: 0 auto; }
.hero-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 26px;
}
.hero-header .page-header {
    flex: 1;
}
.brand-logo-wrap {
    flex-shrink: 0;
}
.brand-logo {
    width: 78px;
    max-width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: normal;
    opacity: 1;
}
.page-header { margin: 0; }
.page-title {
    color: #ffffff;
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0.2px;
}
.page-title-small {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.9;
}
.page-subtitle { color: #e2e8f0; margin: 0; font-size: 14px; }
.signin-link {
    text-decoration: none;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border: 0;
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.signin-link:hover {
    transform: translateY(-1px);
}
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
}
.form-card { padding: 24px; margin-bottom: 18px; }
.table-card { padding: 18px; overflow: hidden; }
.section-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.section-desc { margin: 0 0 20px; color: #475569; font-size: 14px; }
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: #334155; }
.field input {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
}
.field .field-search {
    margin-bottom: 8px;
}
.field select {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
}
.field input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}
.field select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}
.nik-lookup-status {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}
.nik-lookup-status--loading { color: #64748b; }
.nik-lookup-status--success { color: #15803d; }
.nik-lookup-status--warning { color: #b45309; }
.nik-lookup-status--error { color: #b91c1c; }
body.absensi-modal-open {
    overflow: hidden;
}
.absensi-duplicate-modal[hidden] {
    display: none;
}
.absensi-duplicate-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
}
.absensi-duplicate-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}
.absensi-duplicate-modal__dialog {
    position: relative;
    width: min(100%, 420px);
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 24px 22px;
    text-align: center;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(99, 102, 241, 0.08);
    animation: absensi-modal-in 0.22s ease-out;
}
@keyframes absensi-modal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.absensi-duplicate-modal__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #b45309;
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    box-shadow: inset 0 0 0 1px #fed7aa;
}
.absensi-duplicate-modal__icon svg {
    width: 28px;
    height: 28px;
}
.absensi-duplicate-modal__title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.absensi-duplicate-modal__desc {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.55;
    color: #475569;
}
.absensi-duplicate-modal__desc strong {
    color: #312e81;
    font-weight: 700;
}
.absensi-duplicate-modal__meeting {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
    text-align: left;
}
.absensi-duplicate-modal__meeting-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
}
.absensi-duplicate-modal__hint {
    margin: 0 0 18px;
    font-size: 12px;
    line-height: 1.45;
    color: #94a3b8;
}
.absensi-duplicate-modal__btn {
    width: 100%;
}
.actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
    border: 0;
    border-radius: 12px;
    height: 42px;
    padding: 0 18px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-primary {
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}
.btn-secondary { background: #e2e8f0; color: #0f172a; text-decoration: none; }
.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    scrollbar-width: thin;
    scrollbar-color: #818cf8 #e8ecf4;
}
.table-wrap::-webkit-scrollbar {
    height: 9px;
}
.table-wrap::-webkit-scrollbar-track {
    background: linear-gradient(90deg, #e8ecf4, #f1f5f9);
    border-radius: 0 0 11px 11px;
}
.table-wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #6366f1, #7c3aed);
    border-radius: 999px;
    border: 2px solid #e8ecf4;
}
.table-wrap::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #818cf8, #a78bfa);
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1020px;
    background: #fff;
}
th, td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    white-space: nowrap;
}
th {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
td:nth-child(1) { font-weight: 600; color: #6366f1; }
.absensi-group-header td {
    background: #eef2ff;
    color: #312e81;
    font-weight: 700;
    font-size: 13px;
    white-space: normal;
    border-bottom: 1px solid #c7d2fe;
}
.empty {
    text-align: center;
    padding: 28px 12px;
    color: #64748b;
    font-size: 14px;
    background: #ffffff;
}
.absensi-pagination {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}
.absensi-page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.absensi-page-link:hover:not(.is-disabled):not(.is-active) {
    border-color: #a5b4fc;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
.absensi-page-link.is-active {
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}
.absensi-page-link.is-disabled {
    pointer-events: none;
    opacity: 0.42;
}
@media (max-width: 800px) {
    body { padding: 24px 14px; }
    .hero-header { gap: 12px; }
    .signin-link { padding: 7px 10px; font-size: 13px; }
    .brand-logo { width: 58px; }
    .grid { grid-template-columns: 1fr; }
    .page-title { font-size: 26px; }
    .page-title-small { font-size: 15px; }
    .absensi-pagination { justify-content: center; }
}
