/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: var(--light-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    transition: all 0.3s ease;
}

/* Hero Section with Parallax */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: var(--white);
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    transform: translateZ(0);
    opacity: 0;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/IMG-4696.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    filter: brightness(0.6);
    z-index: 1;
}

.hero-profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background-image: url('../images/logo lamteng.jpg');
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 14, 27, 0.4) 0%, rgba(5, 14, 27, 0.75) 100%);
    z-index: 1;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.parallax-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    max-width: 90%;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    max-width: 90%;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-profile-card {
    width: 130px;
    height: 130px;
    border-radius: 20px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.hero-location {
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 6px 25px rgba(0, 0, 0, 0.55);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    z-index: 2;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--white);
    opacity: 0.8;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: #64748b !important;
    color: var(--white) !important;
}

.btn-secondary:hover {
    background: #475569 !important;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-edit {
    background: var(--warning-color);
    color: var(--white);
}

.btn-edit:hover {
    background: #d97706;
}

.btn-delete {
    background: var(--danger-color);
    color: var(--white);
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-regenerate {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-regenerate:hover {
    background: #7c3aed;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--gray-color);
    line-height: 1.8;
}

/* Process Section */
.process {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.process-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    z-index: 2;
    flex-shrink: 0;
}

.timeline-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin: 0 2rem;
    flex: 1;
    max-width: 400px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.timeline-content p {
    color: var(--gray-color);
    margin-bottom: 0.5rem;
}

.timeline-actor {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-large {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-small {
    max-width: 450px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.modal-header p {
    color: var(--gray-color);
}

.role-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.role-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--gray-color);
    background: var(--white);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.role-btn i {
    font-size: 1.5rem;
    color: var(--gray-color);
}

.role-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
}

.role-btn.active i {
    color: var(--white);
}

.role-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    height: 50px;
    padding: 6px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* NIK Input Error State */
.form-group input.nik-error {
    border-color: var(--danger-color) !important;
    background-color: rgba(239, 68, 68, 0.05);
}

.form-group input.nik-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-group input.nik-valid {
    border-color: var(--success-color) !important;
    background-color: rgba(16, 185, 129, 0.05);
}

.form-group input.nik-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Password Toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--gray-color);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle i {
    font-size: 1.1rem;
}

.form-group select {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-group select option {
    white-space: normal;
    word-break: break-word;
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
    color: var(--gray-color);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Form Dynamic Fields */
#dynamicFields,
#editDynamicFields {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 2px dashed #e2e8f0;
}

#dynamicFields:empty,
#editDynamicFields:empty {
    display: none;
}

#dynamicFields .form-group:last-child,
#editDynamicFields .form-group:last-child {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

/* Dashboard */
.dashboard {
    display: none;
    min-height: 100vh;
    padding: 100px 20px 50px;
    background: var(--light-color);
    position: relative;
    width: 100%;
}

.dashboard.active {
    display: block;
    overflow-y: auto;
}

.dashboard-header {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h2 {
    font-size: 2rem;
    color: var(--dark-color);
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.dashboard-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    color: var(--white);
    box-shadow: var(--shadow);
}

.stat-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Stat Card Clickable - For Archive Card */
.stat-card.stat-card-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card.stat-card-clickable:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.stat-card.stat-card-clickable::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
    /* ← Penting! Agar tidak menghalangi klik */
    z-index: 1;
}

.stat-card.stat-card-clickable:hover::after {
    left: 100%;
}

/* Pastikan konten di dalam card bisa diklik */
.stat-card.stat-card-clickable>* {
    position: relative;
    z-index: 2;
    pointer-events: none;
    /* Biar parent yang handle klik */
}

.card-action-hint {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.stat-card.stat-card-clickable:hover .card-action-hint {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

/* ================================================
   ARCHIVE REVIEW MODAL STYLES
   ================================================ */

/* Filter Section */
.report-filter-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.report-filter-section .form-group {
    margin-bottom: 0;
}

.report-filter-section .form-group label {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-filter-section .form-group label i {
    color: var(--primary-color);
}

.report-filter-section .form-group input,
.report-filter-section .form-group select {
    height: 45px;
    font-size: 0.9rem;
}

/* Preview Section */
.report-preview-section {
    background: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-height: 350px;
    overflow-y: auto;
}

.report-preview-section .empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray-color);
}

/* Preview Table */
.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.preview-table thead {
    position: sticky;
    top: 0;
    background: var(--primary-color);
    color: var(--white);
}

.preview-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.preview-table th:first-child {
    border-radius: 8px 0 0 0;
}

.preview-table th:last-child {
    border-radius: 0 8px 0 0;
}

.preview-table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.preview-table tbody tr:hover {
    background: #f8fafc;
}

.preview-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

.preview-table tbody tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

.preview-table .letter-type-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.preview-table .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--success-color);
    color: var(--white);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Summary Section */
.report-summary {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid #a5b4fc;
}

.summary-title {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.summary-item {
    background: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.summary-item .count {
    color: var(--primary-color);
    font-weight: 700;
}

.summary-total {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
}

/* Report Actions */
.report-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px solid #e2e8f0;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

#downloadReportBtn {
    color: #ffffff !important;
}

#downloadReportBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #94a3b8 !important;
    color: #ffffff !important;
}

#downloadReportBtn:not(:disabled) {
    background: linear-gradient(135deg, var(--success-color), #059669) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    color: #ffffff !important;
}

#downloadReportBtn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Preview Info */
.preview-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.preview-info-text {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.preview-info-text strong {
    color: var(--primary-color);
}

/* Responsive for Archive Modal */
@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

    .report-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .report-actions .btn {
        width: 100%;
    }

    .summary-content {
        flex-direction: column;
    }

    .preview-table {
        font-size: 0.8rem;
    }

    .preview-table th,
    .preview-table td {
        padding: 8px 6px;
    }
}

.request-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Request Item - FIXED LAYOUT (No Overlap) */
.request-item {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
}

.request-item.clickable {
    cursor: pointer;
}

.request-item.clickable:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
    background: #f8f9ff;
    border-left-width: 6px;
    border-left-color: var(--secondary-color);
}

/* Header dengan layout yang diperbaiki */
.request-item-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Title di baris pertama */
.request-item-title {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1.05rem;
    line-height: 1.4;
}

/* Container untuk status dan hint */
.request-item-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Status badge */
.request-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-verified {
    background: #d1fae5;
    color: #065f46;
}

.status-signed {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

/* View detail hint - tidak tabrakan lagi */
.view-detail-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.request-item.clickable:hover .view-detail-hint {
    opacity: 1;
}

/* Description text */
.request-item p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Actions row */
.request-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray-color);
    font-style: italic;
}

/* Upload Document System - FIXED UI */
.upload-container {
    width: 100%;
    margin-top: 0.5rem;
}

.file-upload-area {
    background: var(--white);
    border: 3px dashed #cbd5e1;
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background: #ede9fe;
    transform: scale(1.01);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.upload-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.upload-text {
    font-size: 1.1rem;
    color: var(--dark-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-note {
    font-size: 0.85rem;
    color: var(--gray-color);
    display: block;
}

.file-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.file-preview-container:empty {
    display: none;
}

.file-preview-item {
    position: relative;
    background: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem;
    transition: all 0.3s ease;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.file-preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.file-preview-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #f1f5f9;
}

.file-preview-pdf {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-preview-pdf i {
    font-size: 3rem;
    color: #dc2626;
}

.file-preview-name {
    font-size: 0.8rem;
    color: var(--dark-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.3rem;
}

.file-preview-size {
    font-size: 0.75rem;
    color: var(--gray-color);
}

.file-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    background: var(--danger-color);
    color: var(--white);
    border: 3px solid var(--white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    z-index: 10;
}

.file-remove-btn:hover {
    transform: scale(1.2) rotate(90deg);
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

.upload-progress {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    min-width: 340px;
    animation: slideInRight 0.3s ease;
    border: 2px solid var(--primary-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.upload-progress h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.upload-progress h4 i {
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.progress-text {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-align: center;
    font-weight: 600;
}

/* Document Attachments in Dashboard */
.document-attachments {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #e2e8f0;
}

.document-attachments h4 {
    font-size: 0.9rem;
    color: var(--dark-color);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.document-attachments h4 i {
    color: var(--primary-color);
    font-size: 1rem;
}

.document-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.document-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #93c5fd;
    font-weight: 500;
    white-space: nowrap;
}

.document-badge:hover {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.document-badge i {
    font-size: 1rem;
}

.document-badge.pdf-badge {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-color: #fca5a5;
}

.document-badge.pdf-badge:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.document-badge.image-badge {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-color: #93c5fd;
}

.document-badge.image-badge:hover {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
}

.no-documents {
    text-align: center;
    padding: 1rem;
    color: var(--gray-color);
    font-size: 0.9rem;
    font-style: italic;
}

/* Detail Modal */
.detail-status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 1rem;
}

.detail-content {
    padding: 0;
}

.detail-section {
    padding: 1.5rem;
    border-bottom: 2px dashed #e2e8f0;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-section h3 i {
    color: var(--primary-color);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.detail-label {
    font-size: 0.85rem;
    color: var(--gray-color);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.detail-value {
    font-size: 1rem;
    color: var(--dark-color);
    font-weight: 500;
    word-break: break-word;
}

.detail-value-long {
    white-space: pre-wrap;
    line-height: 1.6;
}

.detail-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.detail-timeline {
    position: relative;
    padding-left: 2rem;
}

.detail-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.timeline-event {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-event:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.4rem;
    top: 0.2rem;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-event.completed .timeline-dot {
    background: var(--success-color);
    box-shadow: 0 0 0 3px var(--success-color);
}

.timeline-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.2rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--gray-color);
}

.empty-detail {
    text-align: center;
    padding: 3rem;
    color: var(--gray-color);
}

.empty-detail i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.loading-detail {
    text-align: center;
    padding: 3rem;
}

.loading-detail i {
    font-size: 3rem;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.detail-documents {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.detail-document-item {
    position: relative;
    background: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.detail-document-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.detail-document-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.detail-document-icon.pdf {
    color: #dc2626;
}

.detail-document-icon.image {
    color: #3b82f6;
}

.detail-document-name {
    font-size: 0.75rem;
    color: var(--dark-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-preview-container {
    margin-top: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    overflow: hidden;
    background: var(--light-color);
}

.pdf-preview-header {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-preview-header h4 {
    font-size: 1rem;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-preview-iframe {
    width: 100%;
    height: 500px;
    border: none;
    background: white;
}

/* Edit Form */
.edit-form {
    padding: 0;
}

.confirm-content {
    text-align: center;
    padding: 2rem 1rem;
}

.confirm-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--warning-color), #fb923c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.confirm-content p {
    font-size: 1.1rem;
    color: var(--dark-color);
    line-height: 1.6;
    margin: 0;
}

.field-changed {
    position: relative;
    animation: highlightChange 2s ease;
}

@keyframes highlightChange {
    0% {
        background: rgba(251, 191, 36, 0.3);
    }

    100% {
        background: transparent;
    }
}

.field-changed::after {
    content: 'Diubah';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--warning-color);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* Profile Section */
.profile {
    padding: 100px 0;
    background: var(--white);
}

.profile-intro {
    margin-bottom: 3rem;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.stat-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    color: var(--white);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-box .stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-box .stat-icon i {
    font-size: 1.8rem;
}

.stat-box h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat-box p {
    font-size: 1rem;
    opacity: 0.95;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.profile-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-card h3 i {
    color: var(--primary-color);
}

.dusun-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.dusun-item {
    background: var(--light-color);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.dusun-item.dusun-clickable {
    cursor: pointer;
}

.dusun-item.dusun-clickable:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    background: #e2e8f0;
}

.dusun-item strong {
    color: var(--dark-color);
    font-size: 1.1rem;
}

.dusun-item span {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.gender-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.gender-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--light-color);
    padding: 2rem;
    border-radius: 15px;
}

.gender-item i {
    font-size: 3rem;
    color: var(--primary-color);
}

.gender-item strong {
    display: block;
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.3rem;
}

.gender-item p {
    color: var(--gray-color);
    margin: 0;
}

.age-groups {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.age-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--light-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.age-item:hover {
    background: #e2e8f0;
    transform: translateX(5px);
}

.age-range {
    color: var(--dark-color);
    font-weight: 500;
}

.age-count {
    color: var(--gray-color);
    font-weight: 600;
}

.social-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 15px;
}

.social-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.social-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.social-item strong {
    display: block;
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 0.3rem;
}

.social-item p {
    color: var(--gray-color);
    margin: 0;
}

.highlight-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid var(--primary-color);
}

.analysis-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.analysis-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.analysis-item i {
    color: var(--success-color);
    font-size: 1.2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.analysis-item p {
    color: var(--dark-color);
    line-height: 1.6;
    margin: 0;
}

.analysis-item strong {
    color: var(--primary-color);
}

/* Dusun Detail Modal */
.dusun-detail-section {
    margin-bottom: 2rem;
}

.dusun-detail-section:last-child {
    margin-bottom: 0;
}

.dusun-detail-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dusun-detail-section h3 i {
    color: var(--primary-color);
}

.dusun-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.dusun-stat-item {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid var(--primary-color);
}

.dusun-stat-item .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.dusun-stat-item .stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.dusun-age-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.dusun-age-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--light-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.dusun-age-item:hover {
    background: #e2e8f0;
    transform: translateX(5px);
}

.dusun-age-range {
    color: var(--dark-color);
    font-weight: 500;
}

.dusun-age-count {
    color: var(--gray-color);
    font-weight: 600;
}

.dusun-info-text {
    color: var(--dark-color);
    line-height: 1.8;
    margin: 0;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.dusun-info-text strong {
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

/* AOS Animation */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .process-timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }

    .timeline-number {
        position: absolute;
        left: 0;
    }

    .timeline-content {
        margin: 0;
        max-width: 100%;
    }

    .role-selector {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .request-item-header {
        gap: 0.75rem;
    }

    .request-item-title {
        font-size: 1rem;
    }

    .request-status {
        font-size: 0.8rem;
        padding: 4px 12px;
    }

    .view-detail-hint {
        font-size: 0.75rem;
    }

    .document-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .file-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.8rem;
    }

    .file-upload-area {
        padding: 2rem 1rem;
    }

    .upload-icon {
        width: 60px;
        height: 60px;
    }

    .upload-icon i {
        font-size: 2rem;
    }

    .upload-progress {
        left: 10px;
        right: 10px;
        min-width: auto;
        bottom: 10px;
        padding: 1rem 1.5rem;
    }

    .modal-large {
        max-width: 95%;
        margin: 1rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .detail-documents {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .pdf-preview-iframe {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .request-item-header-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-detail-hint {
        opacity: 1;
    }

    .file-preview-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .upload-text {
        font-size: 1rem;
    }

    .upload-note {
        font-size: 0.8rem;
    }
}

/* ============================================
   KELOLA DATA PENDUDUK - DASHBOARD PETUGAS
   ============================================ */

.dusun-manage-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dusun-manage-item {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
}

.dusun-manage-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
    background: #f8f9ff;
}

.dusun-manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dusun-manage-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dusun-manage-actions {
    display: flex;
    gap: 0.5rem;
}

.dusun-manage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.dusun-stat-mini {
    background: var(--white);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.dusun-stat-mini .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.dusun-stat-mini .stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-color);
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px dashed #e2e8f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3 i {
    color: var(--primary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dusun-manage-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dusun-manage-actions {
        width: 100%;
    }

    .dusun-manage-actions .btn {
        flex: 1;
    }

    .dusun-manage-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PROFILE TABS SECTION
   ============================================ */

.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 15px;
}

.profile-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--gray-color);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-tab-btn i {
    font-size: 1.1rem;
}

.profile-tab-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.profile-tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.profile-tab-content {
    min-height: 400px;
}

.profile-tab-panel {
    display: none;
    animation: fadeInPanel 0.4s ease;
}

.profile-tab-panel.active {
    display: block;
}

@keyframes fadeInPanel {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* History Card Styles */
.history-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid var(--primary-color);
}

.history-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.history-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.history-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

.history-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--success-color), #34d399);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.history-content p {
    color: var(--dark-color);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.history-content p em {
    color: var(--primary-color);
    font-style: italic;
}

.suku-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.suku-item {
    display: inline-block;
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--dark-color);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.suku-item:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* Batas Wilayah Grid */
.batas-wilayah-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.batas-item {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.batas-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.batas-item.utara {
    border-top: 4px solid #3b82f6;
}

.batas-item.selatan {
    border-bottom: 4px solid #ef4444;
}

.batas-item.barat {
    border-left: 4px solid #f59e0b;
}

.batas-item.timur {
    border-right: 4px solid #10b981;
}

.batas-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.batas-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.batas-item h4 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.batas-item p {
    color: var(--gray-color);
    margin: 0;
    line-height: 1.4;
}

.batas-item small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Data Table Styles */
.data-table-container {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 0.95rem;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.data-table th {
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: var(--dark-color);
    vertical-align: top;
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.data-table td i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.data-table td strong {
    color: var(--primary-color);
}

/* Struktur Desa Styles */
.struktur-card {
    background: var(--white);
}

.struktur-image-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
    overflow-x: auto;
    border: 2px solid #e2e8f0;
}

.struktur-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.struktur-image:hover {
    transform: scale(1.02);
}

.struktur-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 15px;
    margin-bottom: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: var(--white);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.legend-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.legend-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.kepala {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.legend-dot.sekretaris {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.legend-dot.kaur {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.struktur-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.struktur-info-item {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

.struktur-info-item h4 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.struktur-info-item h4 i {
    color: var(--primary-color);
}

.struktur-info-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.struktur-info-item li {
    padding: 0.8rem;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.struktur-info-item li:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.struktur-info-item li strong {
    color: var(--primary-color);
}

/* Age Item Highlight */
.age-item.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid var(--primary-color);
}

.age-item.highlight .age-range,
.age-item.highlight .age-count {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive Profile Tabs */
@media (max-width: 992px) {
    .profile-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        gap: 0.3rem;
        padding: 0.8rem;
    }

    .profile-tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .profile-tab-btn span {
        display: none;
    }

    .profile-tab-btn i {
        font-size: 1.2rem;
    }

    .batas-wilayah-grid {
        grid-template-columns: 1fr;
    }

    .history-header {
        flex-direction: column;
        text-align: center;
    }

    .history-header h3 {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .profile-tabs {
        padding: 0.5rem;
    }

    .profile-tab-btn {
        padding: 0.8rem;
        border-radius: 10px;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.8rem 0.6rem;
    }

    .struktur-legend {
        grid-template-columns: 1fr;
    }

    .struktur-info {
        grid-template-columns: 1fr;
    }
}

/* Leadership Badges */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Current Leader Row */
.current-leader {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1)) !important;
    border-left: 4px solid #10b981;
}

.current-leader td {
    font-weight: 600;
    color: var(--dark-color);
}

/* Table Footer Row */
.table-footer {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1)) !important;
    font-weight: 600;
}

.table-footer td {
    border-top: 2px solid var(--primary-color);
}


.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 400px;
    max-width: 500px;
    animation: slideUp 0.3s ease;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.loading-progress {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.loading-steps {
    text-align: left;
    margin-top: 20px;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
    opacity: 0;
    animation: fadeInSlide 0.3s ease forwards;
}

.loading-step.active {
    color: #6366f1;
    font-weight: 600;
}

.loading-step.completed {
    color: #10b981;
}

.loading-step-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
}

.loading-step.active .loading-step-icon {
    background: #6366f1;
    color: white;
    animation: pulse 1s infinite;
}

.loading-step.completed .loading-step-icon {
    background: #10b981;
    color: white;
}

.loading-step.pending .loading-step-icon {
    background: #e0e0e0;
    color: #999;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .loading-content {
        min-width: 90%;
        padding: 30px 20px;
    }

    .loading-spinner {
        width: 60px;
        height: 60px;
        border-width: 6px;
    }

    .loading-text {
        font-size: 18px;
    }
}

.nomor-surat-input input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.nomor-surat-input input:enabled {
    background-color: #fff;
    border: 2px solid var(--primary-color);
}

#nomorSuratPreview {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 8px;
}

#nomorSuratPreview strong {
    color: #0d47a1;
    font-size: 16px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

.form-section {
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.text-muted {
    color: #6c757d;
}

.alert-info {
    color: #004085;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.row {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 0.5rem;
}

.small {
    font-size: 0.875rem;
}

/* ============================================
   PROFIL WARGA CARD
   ============================================ */

.profil-warga-card {
    border-top: 4px solid var(--primary-color);
}

.profil-warga-card h3 {
    color: var(--primary-color);
}

.profil-warga-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.profil-info-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-color);
    margin-bottom: 0.3rem;
}

.profil-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
    padding: 0.6rem 0.8rem;
    background: var(--light-color);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.profil-editable textarea,
.profil-editable select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    color: var(--dark-color);
}

.profil-editable textarea:focus,
.profil-editable select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.profil-warga-card .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.profil-warga-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.profil-warga-card .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Alamat spans full width */
.profil-editable:nth-of-type(1) {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .profil-warga-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PROFIL WARGA PAGE (STANDALONE)
   ============================================ */

.profil-warga-page {
    padding: 100px 0 50px;
    background: #f1f5f9;
    min-height: 100vh;
}

.profil-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.profil-page-header h2 {
    font-size: 2rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.profil-page-header h2 i {
    color: var(--primary-color);
}

#navProfilItem i {
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

#navProfilItem:hover i {
    transform: scale(1.1);
    color: var(--primary-color);
}