
        /* ===== BASE ===== */
        body {
            background: linear-gradient(135deg, #e0eafc 0%, #d5e4f7 25%, #c3daf0 50%, #e8d5f5 75%, #d4f5e9 100%);
            background-size: 400% 400%;
            background-attachment: fixed;
            animation: auroraShift 15s ease infinite;
            padding: 20px;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            transition: background 0.6s ease, color 0.4s ease;
        }

        @keyframes auroraShift {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        /* Animated accent line for cards */
        @keyframes gradientLine {
            0% { background-position: 0% 0%; }
            100% { background-position: 200% 0%; }
        }

        /* GLASSMORPHISM CARDS */
        .card {
            border-radius: 24px;
            border: 1px solid rgba(255, 255, 255, 0.5);
            background: rgba(255, 255, 255, 0.65);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.4);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4, #6366f1);
            background-size: 200% 100%;
            animation: gradientLine 3s linear infinite;
        }

        .bg-custom {
            background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
            backdrop-filter: blur(10px);
            color: white;
            border-bottom: none;
        }

        .card-header.bg-custom {
            border-radius: 24px 24px 0 0;
            padding: 1.2rem 1.5rem;
        }

        /* SMOOTH BUTTONS */
        .btn {
            border-radius: 12px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 600;
        }
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
        }
        .btn:active {
            transform: translateY(0px);
        }

        .btn-custom {
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
            color: white !important;
            border: none !important;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
        }
        .btn-custom:hover {
            background: linear-gradient(135deg, #5558e6 0%, #7c4fe0 100%) !important;
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
        }

        /* FORM CONTROLS MODERN */
        .form-control, .form-select {
            border-radius: 12px;
            border: 1px solid rgba(0, 0, 0, 0.08);
            background-color: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(4px);
            transition: all 0.3s ease;
            padding: 0.65rem 1rem;
            font-size: 0.95rem;
        }
        .form-control:focus, .form-select:focus {
            border-color: transparent;
            background-color: #ffffff;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 4px 12px rgba(99, 102, 241, 0.1);
            transform: translateY(-1px);
        }

        .form-label {
            font-weight: 600;
            font-size: 0.78rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* TABLE MODERNIZATION */
        .table-responsive {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(16px);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.4);
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
            padding: 8px;
        }
        .table {
            margin-bottom: 0;
            border-collapse: separate;
            border-spacing: 0;
        }
        .table th {
            background-color: rgba(43, 58, 74, 0.05) !important;
            color: #2b3a4a !important;
            border-bottom: 2px solid rgba(43, 58, 74, 0.1) !important;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.8rem;
            letter-spacing: 0.5px;
            padding: 0.5rem 0.75rem;
        }
        .table td {
            padding: 0.5rem 0.75rem;
            font-size: 0.9rem;
            vertical-align: middle;
            border-bottom: 1px solid rgba(0, 0, 0, 0.04);
            transition: background-color 0.2s ease;
        }
        .table-hover tbody tr:hover td {
            background-color: rgba(13, 110, 253, 0.03) !important;
        }

        /* STATUS BADGES & COLORS */
        .status-synced { color: #0d6efd; font-weight: 600; }
        .status-pending { color: #fd7e14; font-weight: 600; }
        .badge-status { white-space: normal !important; line-height: 1.5; font-weight: 500; letter-spacing: 0.3px; }
        
        /* MODERN SYNC PROGRESS UI */
        #syncProgress {
            display: none;
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(13, 110, 253, 0.3);
            border-radius: 20px;
            box-shadow: 0 10px 40px rgba(13, 110, 253, 0.15);
            padding: 24px;
            margin-bottom: 24px;
            text-align: center;
            transition: all 0.3s ease;
        }
        #syncProgress .progress {
            height: 14px;
            border-radius: 12px;
            background-color: rgba(13, 110, 253, 0.1);
            overflow: hidden;
            margin-bottom: 15px;
            border: none;
        }
        #syncProgress .progress-bar {
            background: linear-gradient(90deg, #0d6efd, #0dcaf0, #0d6efd);
            background-size: 200% 100%;
            animation: gradientMove 2s linear infinite;
        }
        @keyframes gradientMove {
            0% { background-position: 100% 0; }
            100% { background-position: -100% 0; }
        }
        #progressText {
            font-size: 1.15rem;
            color: #0d6efd;
            font-weight: 700;
            letter-spacing: 0.5px;
        }
        /* Theme styles loaded from themes.css */

        
        .ternak-box {
            background: rgba(255, 255, 255, 0.5);
            padding: 20px;
            border-radius: 16px;
            border: 1px solid rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
        }
        .ternak-box:hover {
            background: rgba(255, 255, 255, 0.8);
            border-color: rgba(0, 0, 0, 0.1);
        }

        .ternak-box .form-check-input {
            width: 1.15em;
            height: 1.15em;
            border: 2px solid #94a3b8;
            cursor: pointer;
        }
        .ternak-box .form-check-input:checked {
            background-color: #0d6efd;
            border-color: #0d6efd;
            box-shadow: 0 0 0 0.22rem rgba(13, 110, 253, 0.22);
        }
        .ternak-box .form-check-input:checked + .form-check-label {
            color: #0d6efd !important;
        }
        .ternak-box #t_strip:checked {
            background-color: #dc3545;
            border-color: #dc3545;
            box-shadow: 0 0 0 0.22rem rgba(220, 53, 69, 0.22);
        }
        .ternak-box #t_strip:checked + .form-check-label {
            color: #dc3545 !important;
        }

        /* FOTO CARDS */
        .foto-card {
            background: rgba(255, 255, 255, 0.6);
            border: 2px dashed rgba(0, 0, 0, 0.12);
            border-radius: 16px;
            padding: 15px;
            text-align: center;
            transition: all 0.3s ease;
        }
        .foto-card:hover {
            border-color: #0d6efd;
            background: rgba(13, 110, 253, 0.02);
            transform: translateY(-2px);
        }
        .foto-preview {
            position: relative;
            margin-top: 10px;
            border-radius: 12px;
            overflow: hidden;
            border: 2px solid #0d6efd;
            box-shadow: 0 4px 15px rgba(13, 110, 253, 0.15);
            transition: transform 0.3s ease;
        }
        .foto-preview:hover {
            transform: scale(1.02);
        }
        .foto-preview img {
            width: 100%;
            height: 130px;
            object-fit: cover;
            cursor: pointer;
            display: block;
        }
        .btn-rm-foto {
            position: absolute;
            top: 6px;
            right: 6px;
            background: rgba(220, 53, 69, 0.9);
            color: #fff;
            border: none;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            backdrop-filter: blur(4px);
        }
        .btn-rm-foto:hover {
            background: #dc3545;
            transform: scale(1.1);
        }
        .foto-badge {
            position: absolute;
            bottom: 6px;
            left: 6px;
            font-size: 10px;
            padding: 4px 8px;
            border-radius: 6px;
            font-weight: 700;
            color: #fff;
            backdrop-filter: blur(4px);
            letter-spacing: 0.5px;
        }
        .badge-cam { background: rgba(13, 110, 253, 0.85); }
        .badge-gal { background: rgba(25, 135, 84, 0.85); }

        /* MODALS */
        .modal-content {
            border-radius: 20px;
            border: none;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(16px);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
        }
        #cameraModal, #previewModal {
            display: none;
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
            z-index: 9999;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        #cameraVideo {
            width: 100%; max-height: 70vh; object-fit: contain;
            background: transparent;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }
        .cam-ctrl { display: flex; gap: 20px; padding: 20px; align-items: center; justify-content: center; }
        .btn-snap {
            width: 72px; height: 72px; border-radius: 50%;
            background: rgba(255,255,255,0.2);
            border: 4px solid #fff;
            cursor: pointer; position: relative;
            backdrop-filter: blur(4px);
            transition: all 0.2s ease;
        }
        .btn-snap::after {
            content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
            width: 54px; height: 54px; border-radius: 50%;
            background: #fff; transition: transform .15s;
        }
        .btn-snap:active::after { transform: translate(-50%, -50%) scale(.85); }
        #previewModalImg {
            max-width: 95%; max-height: 85vh; object-fit: contain;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.5);
        }

        /* CARD PROGRAM ENHANCEMENTS */
        .card-gayatri {
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
            color: white !important;
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3) !important;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: none !important;
        }
        .card-pdkt {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
            color: white !important;
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3) !important;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: none !important;
        }
        .card-gayatri-layak {
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
            color: white !important;
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3) !important;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: none !important;
        }
        .card-gayatri-tidak {
            background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 100%) !important;
            color: #1e1b4b !important;
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2) !important;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: none !important;
        }
        .card-pdkt-layak {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
            color: white !important;
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3) !important;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: none !important;
        }
        .card-pdkt-tidak {
            background: linear-gradient(135deg, #6ee7b7 0%, #34d399 100%) !important;
            color: #064e3b !important;
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2) !important;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: none !important;
        }
        .card-gayatri:hover, .card-pdkt:hover,
        .card-gayatri-layak:hover, .card-gayatri-tidak:hover,
        .card-pdkt-layak:hover, .card-pdkt-tidak:hover {
            transform: translateY(-4px) scale(1.02);
        }

        .program-summary-card {
            min-height: 120px;
            overflow: hidden;
            position: relative;
        }
        .program-summary-card::after {
            content: '';
            position: absolute;
            width: 110px;
            height: 110px;
            right: -34px;
            bottom: -42px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.16);
        }
        .program-summary-card .program-total {
            font-size: clamp(2rem, 5vw, 3rem);
            line-height: 1;
            letter-spacing: -1px;
        }
        .program-summary-card .program-note {
            font-size: 0.78rem;
            opacity: 0.9;
            position: relative;
            z-index: 1;
        }
        .filter-panel {
            background: rgba(255,255,255,0.68);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,0.48);
            border-radius: 22px;
            box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
        }
        .filter-panel .form-label {
            margin-bottom: 0.35rem;
            color: #475569 !important;
        }
        .filter-panel .form-control,
        .filter-panel .form-select,
        .filter-panel .btn-filter-action {
            height: 42px;
            border-radius: 12px;
        }
        .sync-inline-wrap .sync-pill,
        .sync-inline-wrap .sync-button {
            min-height: 38px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
        }

        /* BADGE PULSE ANIMATION (light) */
        .badge.bg-success {
            animation: pulseBadge 2s ease-in-out infinite;
        }
        @keyframes pulseBadge {
            0%, 100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.3); }
            50% { box-shadow: 0 0 0 6px rgba(25, 135, 84, 0); }
        }

        .cam-label {
            color: #fff;
            font-size: 14px;
            font-weight: 700;
            padding: 6px 16px;
            background: rgba(13, 110, 253, .8);
            border-radius: 20px;
            margin-bottom: 8px
        }

        .foto-card.drag-over {
            border-color: #0d6efd !important;
            background: rgba(13, 110, 253, 0.1) !important;
            border-width: 2px !important;
        }

        /* FOOTER BASE */
        footer {
            background: rgba(255, 255, 255, 0.7) !important;
            backdrop-filter: blur(10px);
            border-top: 1px solid rgba(255, 255, 255, 0.4) !important;
        }

        .progress-modal .modal-content {
            border-radius: 28px;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.88);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
        }
        .progress-hero {
            background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.24), transparent 34%), linear-gradient(135deg, #172033 0%, #2f3f59 100%);
            color: white;
        }
        .progress-stat {
            border-radius: 20px;
            background: rgba(255, 255, 255, 0.82);
            box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
        }
        .progress-chart-wrap {
            height: 420px;
            min-height: 320px;
            border-radius: 22px;
            background: rgba(255, 255, 255, 0.72);
            border: 1px solid rgba(255, 255, 255, 0.65);
            box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.03);
        }

        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1055;
        }

        .toast {
            border-radius: 16px !important;
            backdrop-filter: blur(10px);
            border: none !important;
            white-space: pre-line;
        }

        /* COMPACT ENTRY FORM - UI only, IDs/events/validation stay unchanged */
        .entry-form-grid {
            --bs-gutter-x: 0;
            --bs-gutter-y: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            align-items: flex-start;
            margin: 0;
        }
        .entry-form-grid > [class*="col-"] {
            flex: 0 0 var(--field-w, 180px);
            width: var(--field-w, 180px);
            max-width: var(--field-w, 180px);
            padding-left: 0;
            padding-right: 0;
            margin-top: 0 !important;
        }
        .entry-form-grid > .field-date { --field-w: 150px; }
        .entry-form-grid > .field-kecamatan { --field-w: 190px; }
        .entry-form-grid > .field-desa { --field-w: 190px; }
        .entry-form-grid > .field-program { --field-w: 190px; }
        .entry-form-grid > .field-name { --field-w: 260px; }
        .entry-form-grid > .field-nik { --field-w: 180px; }
        .entry-form-grid > .field-dusun { --field-w: 180px; }
        .entry-form-grid > .field-rt,
        .entry-form-grid > .field-rw { --field-w: 78px; }
        .entry-form-grid > .field-address { --field-w: 300px; }
        .entry-form-grid > .field-poverty { --field-w: 160px; }
        .entry-form-grid > .field-age { --field-w: 88px; }
        .entry-form-grid > .field-choice { 
            flex: 1 1 120px;
            width: auto;
            max-width: none;
        }
        .entry-form-grid > .field-opd { 
            flex: 1 1 200px;
            width: auto;
            max-width: none;
        }
        .entry-form-grid .form-control,
        .entry-form-grid .form-select {
            width: 100%;
        }
        .form-section-full,
        .attachment-grid,
        .form-action-row {
            flex: 0 0 100% !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        .entry-media-layout {
            flex: 0 0 100% !important;
            width: 100% !important;
            max-width: 100% !important;
            display: grid;
            grid-template-columns: minmax(330px, 0.95fr) minmax(380px, 1.05fr);
            gap: 14px;
            align-items: start;
            margin-top: 10px;
        }
.media-panel {
            min-width: 0;
            padding-top: 6px;
        }
        .upload-panel .border-bottom,
        .ternak-panel .form-label {
            margin-bottom: 1rem;
        }
.attachment-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            row-gap: 36px;
            column-gap: 10px;
            align-items: start;
        }
        .attachment-grid > [class*="col-"] {
            width: auto;
            max-width: none;
            padding: 0;
        }
        .attachment-tile .foto-card {
            height: auto;
            padding: 9px;
            border-radius: 14px;
        }
        .attachment-tile .form-label {
            margin-bottom: 0.35rem;
        }
        .attachment-tile .btn {
            min-height: 40px;
            padding: 0.42rem 0.55rem;
            font-size: 0.78rem;
        }
        .attachment-tile .foto-preview img {
            height: 96px;
        }
        .attachment-tile small {
            font-size: 0.72rem;
            word-break: break-word;
        }
        .entry-form-grid > .action-safe-row {
            position: static !important;
            clear: both;
            margin-top: 24px !important;
            padding-top: 12px;
            border-top: 1px solid rgba(43, 58, 74, 0.12);
            z-index: auto !important;
        }
        .action-safe-row .btn {
            margin: 0 !important;
            min-height: 42px;
        }

        @media (max-width: 992px) {
            .entry-media-layout {
                grid-template-columns: 1fr;
            }
            .attachment-grid {
                grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
            }
        }

        @media (max-width: 576px) {
            .entry-form-grid {
                gap: 12px;
            }
            .entry-form-grid > [class*="col-"] {
                flex-basis: 100%;
                width: 100%;
                max-width: 100%;
            }
            .entry-form-grid > .field-rt,
            .entry-form-grid > .field-rw,
            .entry-form-grid > .field-age {
                flex-basis: calc(50% - 6px);
                width: calc(50% - 6px);
                max-width: calc(50% - 6px);
            }
            .entry-form-grid > .field-choice {
                flex-basis: calc(50% - 6px);
                width: calc(50% - 6px);
                max-width: calc(50% - 6px);
            }
            .entry-media-layout {
                grid-template-columns: 1fr;
                gap: 12px;
                margin-top: 8px;
            }
            .attachment-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 10px;
            }
            .attachment-tile .foto-preview img { height: 86px; }
            .attachment-tile .btn {
                min-height: 40px;
                padding: 0.4rem;
                font-size: 0.74rem;
            }
            .action-safe-row {
                margin-top: 24px !important;
                justify-content: stretch !important;
                gap: 8px !important;
            }
            .action-safe-row .btn {
                flex: 1 1 100%;
            }
        }

        @media (max-width: 576px) {
            body { padding: 12px; }
            .user-topbar {
                flex-wrap: wrap;
                gap: 12px;
                padding: 14px !important;
                text-align: center;
                justify-content: center !important;
            }
            .user-topbar > div:first-child { width: 100%; }
            .user-topbar h2 { font-size: 1.15rem; }
            .user-topbar h5 { font-size: 0.9rem; }
            .user-actions {
                width: 100%;
                flex-wrap: wrap;
                justify-content: center;
                gap: 6px;
            }
            .user-actions .btn,
            #btnThemeToggle {
                margin: 0 !important;
                padding: 0.32rem 0.62rem !important;
                font-size: 0.78rem;
                border-radius: 10px !important;
                line-height: 1.2;
            }
        }

    