* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Theme Variations */
body[data-theme="blue"] {
    --primary: #2193b0;
    --primary-dark: #1a7a8f;
    --gradient: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
}

body[data-theme="green"] {
    --primary: #11998e;
    --primary-dark: #0d7a72;
    --gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

body[data-theme="orange"] {
    --primary: #f46b45;
    --primary-dark: #d45537;
    --gradient: linear-gradient(135deg, #f46b45 0%, #eea849 100%);
}

body[data-theme="pink"] {
    --primary: #ee0979;
    --primary-dark: #c00763;
    --gradient: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

body[data-theme="purple"] {
    --primary: #8e2de2;
    --primary-dark: #6f23b0;
    --gradient: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
}

body[data-theme="red"] {
    --primary: #eb3349;
    --primary-dark: #c02a3d;
    --gradient: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

body[data-theme="teal"] {
    --primary: #06beb6;
    --primary-dark: #048a85;
    --gradient: linear-gradient(135deg, #06beb6 0%, #48b1bf 100%);
}

body[data-theme="indigo"] {
    --primary: #4568dc;
    --primary-dark: #3651b3;
    --gradient: linear-gradient(135deg, #4568dc 0%, #b06ab3 100%);
}

body[data-theme="amber"] {
    --primary: #f7971e;
    --primary-dark: #c77818;
    --gradient: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 6s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-circle {
    width: 100px;
    height: 100px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: all 0.3s ease;
}

.logo-circle:hover {
    transform: scale(1.05);
}

.logo-text {
    color: white;
    font-size: 42px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.logo-circle svg {
    color: white;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray);
    font-size: 14px;
}

/* Theme Selector */
.theme-selector {
    margin-bottom: 32px;
    padding: 20px;
    background: var(--light);
    border-radius: 12px;
}

.theme-selector label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    font-size: 14px;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.theme-btn {
    background: white;
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-btn.active {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.theme-btn.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.theme-preview {
    width: 100%;
    height: 40px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .theme-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .theme-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.login-form input::placeholder {
    color: #9ca3af;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 32px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.error-message {
    margin-top: 20px;
    padding: 12px 16px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: var(--danger);
    font-size: 14px;
    text-align: center;
}

.loading-spinner {
    text-align: center;
    margin-top: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: white;
    font-size: 13px;
    opacity: 0.9;
}

/* Dashboard Styles */
.dashboard-page {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
    overflow-x: hidden;
    width: 100%;
}

.sidebar {
    width: 280px;
    background: white;
    box-shadow: 2px 0 12px var(--shadow);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
    transition: width 0.3s ease, transform 0.3s ease;
}

/* Sidebar collapsed state */
body.sidebar-collapsed .sidebar {
    width: 70px;
}

body.sidebar-collapsed .sidebar-header h2,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .user-details,
body.sidebar-collapsed .btn-logout span,
body.sidebar-collapsed .btn-install-app span,
body.sidebar-collapsed .theme-toggle {
    display: none;
}

body.sidebar-collapsed .main-content {
    margin-left: 70px;
}

body.sidebar-collapsed .topbar {
    left: 70px;
    width: calc(100% - 70px);
}

body.sidebar-collapsed .loading-progress-bar {
    left: 70px;
}

body.sidebar-collapsed .bottom-nav {
    left: 70px;
    width: calc(100% - 70px);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-small {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.logo-small svg {
    color: white;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 4px 12px;
    border-radius: 10px;
}

.nav-item:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-item.active {
    background: var(--gradient);
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--gray);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: #fee;
    color: var(--danger);
    border: 1px solid #fcc;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-install-app {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-install-app:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-install-app.installed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    cursor: default;
}

.btn-install-app.installed:hover {
    transform: none;
}

.btn-install-app.installed span::before {
    content: '✓ ';
}

.main-content {
    margin-left: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 280px);
    max-width: calc(100% - 280px);
    overflow-x: hidden;
}

.topbar {
    background: white;
    padding: 20px 32px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    z-index: 50;
    width: calc(100% - 280px);
    max-width: calc(100% - 280px);
    box-sizing: border-box;
    transition: left 0.3s ease, width 0.3s ease;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-toggle-sidebar {
    width: 44px;
    height: 44px;
    background: var(--light);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-toggle-sidebar:hover {
    background: var(--primary);
    color: white;
}

.btn-toggle-sidebar svg {
    transition: transform 0.3s ease;
}

.topbar h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
}

/* Loading Progress Bar */
.loading-progress-bar {
    position: fixed;
    top: 80px;
    left: 280px;
    right: 0;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 100;
    display: none;
    transition: left 0.3s ease;
    border-radius: 0 0 4px 4px;
    overflow: visible;
}

.loading-progress-bar.active {
    display: block;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient);
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 
        0 0 20px var(--primary),
        0 0 40px var(--primary),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    will-change: width;
    position: relative;
    border-radius: 0 4px 4px 0;
    animation: shimmer 2s linear infinite;
}

/* Shimmer animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Pulse effect */
.progress-bar-fill::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.5), 
        transparent
    );
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(-5px);
    }
}

/* Progress percentage badge */
.progress-bar-fill::after {
    content: attr(data-progress) '%';
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px var(--primary);
    white-space: nowrap;
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.1);
    }
}

.progress-bar-text {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: white;
    padding: 6px 16px;
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Icon animation in text */
.progress-bar-text::before {
    content: '⏳';
    font-size: 14px;
    animation: rotate 2s linear infinite;
}

.progress-bar-text.processing::before {
    content: '⚙️';
    animation: spin 1s linear infinite;
}

.progress-bar-text.finishing::before {
    content: '✨';
    animation: sparkle 0.5s ease-in-out infinite;
}

.progress-bar-text.complete::before {
    content: '✅';
    animation: checkmark 0.5s ease-out;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-refresh {
    width: 44px;
    height: 44px;
    background: var(--light);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.btn-refresh:hover {
    background: var(--primary);
    color: white;
}

.btn-refresh svg {
    transition: all 0.3s ease;
}

/* Mobile only buttons - hidden on desktop */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex;
    }
}

/* Font size control */
body {
    font-size: 16px;
    transition: font-size 0.3s ease;
}

/* Font size control (10x Magnification/Reduction) */
body.font-level--10 { zoom: 0.5; }
body.font-level--9 { zoom: 0.55; }
body.font-level--8 { zoom: 0.6; }
body.font-level--7 { zoom: 0.65; }
body.font-level--6 { zoom: 0.7; }
body.font-level--5 { zoom: 0.75; }
body.font-level--4 { zoom: 0.8; }
body.font-level--3 { zoom: 0.85; }
body.font-level--2 { zoom: 0.9; }
body.font-level--1 { zoom: 0.95; }
body.font-level-1 { zoom: 1.05; }
body.font-level-2 { zoom: 1.1; }
body.font-level-3 { zoom: 1.15; }
body.font-level-4 { zoom: 1.2; }
body.font-level-5 { zoom: 1.25; }
body.font-level-6 { zoom: 1.3; }
body.font-level-7 { zoom: 1.35; }
body.font-level-8 { zoom: 1.4; }
body.font-level-9 { zoom: 1.45; }
body.font-level-10 { zoom: 1.5; }

/* Font size notification */
.font-size-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.font-size-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Dark mode for notification */
body.dark-mode .font-size-notification {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.5);
}

/* Mobile positioning */
@media (max-width: 768px) {
    .font-size-notification {
        top: 70px;
        right: 10px;
        left: 10px;
        text-align: center;
        font-size: 13px;
        padding: 10px 20px;
    }
}

.content-area {
    flex: 1;
    padding: 16px 32px;
    margin-top: 70px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Remove padding for full-width pages like about and rekap */
.content-area.full-width-page {
    padding: 0 !important;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.chart-container {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
}

.chart-container h3 {
    margin-bottom: 20px;
    color: var(--dark);
}

.chart-area {
    height: 300px;
    position: relative;
    overflow: visible;
}

/* Chart.js legend text wrapping */
.chart-area canvas {
    max-width: 100%;
}

/* Custom chart legend with pagination */
.chart-legend {
    padding: 20px;
    max-height: 200px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 8px;
    border-top: 1px solid var(--light);
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 11px;
}

.legend-item:hover {
    background: var(--light);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-text {
    flex: 1;
    line-height: 1.3;
    word-wrap: break-word;
}

/* Force legend text to wrap */
.chartjs-legend,
.chartjs-legend ul,
.chartjs-legend li {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Charts Grid - Side by Side */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Tablet responsive for charts */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    margin-top: 30px;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    left: 16px;
    color: var(--gray);
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-export {
    padding: 12px 24px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-export:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-reset-filter {
    padding: 12px 24px;
    background: var(--warning);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-reset-filter:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.table-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.table-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    /* overflow-x handled by inner .table-scroll-x */
}

.table-scroll-x {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.data-table thead {
    background: var(--gradient);
    color: white;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    background: var(--primary);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    vertical-align: middle;
}

/* Group header row (colspan) */
.data-table thead tr:first-child th[colspan] {
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.12);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 12px;
}

/* Sub-header row */
.data-table thead tr:last-child th {
    font-size: 12px;
    padding: 8px 10px;
    text-align: center;
    background: var(--primary);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: var(--light);
}

.loading-cell {
    text-align: center;
    padding: 40px !important;
    color: var(--gray);
}

.form-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    max-width: 800px;
}

.form-card h3 {
    margin-bottom: 24px;
    color: var(--dark);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn-submit {
    padding: 14px 32px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-reset {
    padding: 14px 32px;
    background: var(--light);
    color: var(--gray);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: var(--border);
}

@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }
    
    .btn-toggle-sidebar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .topbar {
        left: 0 !important;
        width: 100% !important;
    }

    .sidebar-header h2,
    .nav-item span,
    .user-details,
    .btn-logout span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* CRITICAL FIX: Responsive table for mobile */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Ensure table scrolls smoothly */
    }
    
    .data-table {
        /* Ensure minimum width so table can scroll */
        min-width: 1200px;
        /* Keep table structure intact */
        display: table;
    }

    #tableUsersList {
        min-width: 600px;
    }
    
    .data-table thead {
        /* Keep header visible and aligned */
        display: table-header-group;
    }
    
    .data-table tbody {
        /* Keep body aligned with header */
        display: table-row-group;
    }
    
    .data-table tr {
        display: table-row;
    }
    
    .data-table th,
    .data-table td {
        display: table-cell;
        /* Ensure cells don't wrap */
        white-space: nowrap;
        /* Reduce padding for mobile */
        padding: 12px 8px;
        font-size: 12px;
    }
}


/* Form Select Styling */
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    background: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Info Section */
.info-section {
    background: var(--light);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.info-section h4 {
    margin-bottom: 16px;
    color: var(--dark);
    font-size: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

.info-item span {
    font-size: 14px;
    color: var(--dark);
    font-weight: 500;
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced Premium Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    border-radius: 24px;
    width: 95%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    padding: 24px 32px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: white;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
    background: #f8fafc;
}

.detail-section {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: transform 0.3s ease;
}

.detail-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.detail-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section h3 svg {
    color: #6366f1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.detail-item span {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    padding: 12px 16px;
    background: #f1f5f9;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: block;
    min-height: 20px;
}

.detail-item span:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.detail-item span.amount {
    font-size: 18px;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.detail-item span.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.detail-item span.warning {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.detail-item span.percentage {
    font-size: 24px;
    font-weight: 800;
    color: #6366f1;
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
}

.modal-footer {
    padding: 24px 32px;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.btn-modal {
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-excel { background: #10b981; color: white; }
.btn-pdf { background: #ef4444; color: white; }
.btn-close { background: #64748b; color: white; }

.btn-modal:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-modal:active {
    transform: translateY(0);
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@media (max-width: 640px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-header {
        border-radius: 0;
    }
}


/* Pagination Styles */
#pagination,
#paginationKemiskinan,
#paginationSarpras {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

/* Hide pagination when empty */
#pagination:empty,
#paginationKemiskinan:empty,
#paginationSarpras:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 24px;
    background: white;
    border-top: 1px solid var(--border);
    border-radius: 0 0 16px 16px;
}

.pagination-info {
    color: var(--gray);
    font-size: 13px;
    font-weight: 500;
    background: var(--light);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.pagination-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-btn,
.btn-page {
    padding: 0;
    border: 1.5px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    transition: all 0.2s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.pagination-btn::before,
.btn-page::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.pagination-btn:hover:not(:disabled)::before,
.btn-page:hover:not(:disabled)::before {
    width: 200px;
    height: 200px;
}

.pagination-btn:hover:not(:disabled),
.btn-page:hover:not(:disabled) {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.pagination-btn.active,
.btn-page.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    transform: scale(1.08);
}

.pagination-btn:disabled,
.btn-page:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pagination-btn:disabled:hover,
.btn-page:disabled:hover {
    transform: none;
    background: white;
    color: var(--dark);
}

.pagination-dots,
.pagination-ellipsis {
    color: var(--gray);
    padding: 0 6px;
    font-weight: 700;
    font-size: 14px;
    line-height: 36px;
}

/* SVG icons in pagination buttons */
.pagination-btn svg,
.btn-page svg {
    position: relative;
    z-index: 1;
}

/* Filter Styles */
.filters-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 150px;
    gap: 12px;
    flex: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.filter-select:hover {
    border-color: var(--primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Table hover effect */
.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 8px var(--shadow);
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination-buttons {
        justify-content: center;
    }
    
    .filters-row {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
}

/* Data Page Stats Cards */
.data-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.data-stat-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.data-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow);
}

.data-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.data-stat-icon.blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.data-stat-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.data-stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.data-stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.data-stat-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.data-stat-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.data-stat-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.data-stat-icon svg {
    color: white;
}

.data-stat-info {
    flex: 1;
    min-width: 0;
}

.data-stat-label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.3;
}

.data-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    line-height: 1.2;
}

/* Smaller text for currency cards */
#totalAnggaranData,
#totalRealisasiData {
    font-size: 18px;
    line-height: 1.3;
}

/* Topbar User Name Display */
.user-name-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-right: 12px;
}

.user-name-display svg {
    color: var(--primary);
}

.user-name-display span {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

/* Responsive for data stats */
@media (max-width: 1200px) {
    .data-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .data-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .data-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-stat-card {
        padding: 16px;
    }
    
    .data-stat-icon {
        width: 48px;
        height: 48px;
    }
    
    .data-stat-label {
        font-size: 11px;
    }
    
    .data-stat-value {
        font-size: 18px;
    }
    
    #totalAnggaranData,
    #totalRealisasiData {
        font-size: 13px;
    }
    
    .user-name-display {
        padding: 6px 12px;
    }
    
    .user-name-display span {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .data-stats-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   BOTTOM NAVIGATION FOR MOBILE
   ============================================ */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 6px 0;
    border-top: 1px solid var(--border);
    /* Scrollable horizontal */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.bottom-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Fixed width so items don't shrink */
    flex: 0 0 64px;
    min-width: 64px;
    padding: 6px 4px;
    color: var(--gray);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 10px;
    gap: 3px;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* ============================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
    /* Show bottom navigation on mobile */
    .bottom-nav {
        display: flex;
    }
    
    /* Hide sidebar on mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    /* Adjust main content for mobile - FULL WIDTH */
    .main-content {
        margin-left: 0;
        padding-bottom: 70px;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Topbar mobile - compact */
    .topbar {
        position: fixed;
        top: 0;
        left: 0 !important;
        right: 0;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 10px 16px;
    }

    .topbar-left {
        gap: 8px;
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }

    .topbar h1, #pageTitle {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 160px;
    }

    /* Hide non-essential topbar buttons on mobile */
    #installAppBtn {
        display: none !important;
    }

    .user-name-display {
        max-width: 80px;
        overflow: hidden;
    }

    .topbar-buttons {
        gap: 4px;
    }

    .btn-refresh {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    .user-name-display {
        font-size: 13px;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Content area adjustments - FULL WIDTH */
    .content-area {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        margin-top: 70px;
    }
    
    /* Stats grid - 2 columns on mobile, FULL WIDTH */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .stat-card {
        min-width: 0;
        padding: 16px 12px;
    }
    
    .stat-value {
        font-size: 16px;
        word-break: break-word;
        line-height: 1.3;
    }
    
    .stat-label {
        font-size: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }
    
    /* Data stats grid - 2 columns, FULL WIDTH */
    .data-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .data-stat-card {
        min-width: 0;
    }
    
    .data-stat-value {
        font-size: 20px;
        word-break: break-word;
    }
    
    .data-stat-label {
        font-size: 13px;
    }
    
    /* Charts grid - stack on mobile, FULL WIDTH */
    .charts-grid {
        grid-template-columns: 1fr;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Chart container - FULL WIDTH */
    .chart-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .chart-container h3 {
        font-size: 16px;
    }
    
    /* Features grid - FULL WIDTH */
    .features-grid {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* FAQ container - FULL WIDTH */
    .faq-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Table controls - stack vertically, FULL WIDTH */
    .table-controls {
        flex-direction: column;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .filters-row {
        flex-direction: column;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .search-box,
    .filter-select {
        width: 100%;
        box-sizing: border-box;
        font-size: 14px;
    }
    
    .btn-export {
        width: 100%;
        box-sizing: border-box;
        font-size: 14px;
    }
    
    /* Table wrapper - horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    .data-table {
        font-size: 13px;
        min-width: 800px;
    }

    #tableUsersList {
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        white-space: nowrap;
        font-size: 13px;
    }
    
    /* Pagination - FULL WIDTH */
    .pagination-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .pagination-info {
        font-size: 13px;
        text-align: center;
    }
    
    .pagination-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    /* Form card */
    .form-card {
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .form-card h3 {
        font-size: 18px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
        box-sizing: border-box;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Info section */
    .info-section {
        width: 100%;
        box-sizing: border-box;
    }
    
    .info-section h4 {
        font-size: 16px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        word-break: break-word;
    }
    
    .info-item label {
        font-size: 13px;
    }
    
    .info-item span {
        font-size: 15px;
        word-break: break-word;
    }
    
    /* Form actions */
    .form-actions {
        flex-direction: column;
    }
    
    .btn-submit,
    .btn-reset {
        width: 100%;
        box-sizing: border-box;
        font-size: 15px;
    }
    
    /* Modal adjustments - keep padding same */
    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        margin: 20px auto;
        padding: 0;
        box-sizing: border-box;
    }
    
    .modal-header h2 {
        font-size: 18px;
        word-break: break-word;
    }
    
    .modal-body {
        max-height: calc(90vh - 140px);
        overflow-y: auto;
    }
    
    .detail-section {
        width: 100%;
        box-sizing: border-box;
    }
    
    .detail-section h3 {
        font-size: 16px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        word-break: break-word;
    }
    
    .detail-item label {
        font-size: 13px;
    }
    
    .detail-item span {
        font-size: 15px;
        word-break: break-word;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-modal {
        width: 100%;
        font-size: 15px;
        box-sizing: border-box;
    }
    
    /* Login page mobile - keep padding same */
    .login-container {
        width: 100%;
        box-sizing: border-box;
    }
    
    .login-card {
        width: 100%;
        box-sizing: border-box;
    }
    
    .login-card h1 {
        font-size: 24px;
    }
    
    .login-card p {
        font-size: 15px;
    }
}

/* Extra small devices - only font size changes */
@media (max-width: 480px) {
    .topbar h1 {
        font-size: 16px;
    }
    
    .user-name-display {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .data-stat-value {
        font-size: 18px;
    }
    
    .bottom-nav-item {
        font-size: 11px;
    }
}

/* Landscape mode adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .data-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .modal-content {
        max-height: 85vh;
    }
}

/* PWA Standalone mode adjustments */
@media (display-mode: standalone) {
    .topbar {
        padding-top: env(safe-area-inset-top);
    }
    
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* iOS Safe Area */
@supports (padding: max(0px)) {
    .main-content {
        padding-bottom: max(70px, env(safe-area-inset-bottom));
    }
    
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}


/* ============================================
   PWA INSTALL BANNER
   ============================================ */
.install-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    z-index: 10000;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.install-banner-content svg {
    color: var(--primary);
    flex-shrink: 0;
}

.install-banner-content > div {
    flex: 1;
}

.install-banner-content strong {
    display: block;
    color: var(--text);
    font-size: 16px;
    margin-bottom: 4px;
}

.install-banner-content p {
    margin: 0;
    color: var(--gray);
    font-size: 13px;
}

.btn-install {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-install:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-close-banner {
    background: transparent;
    border: none;
    color: var(--gray);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close-banner:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
}

@media (max-width: 768px) {
    .install-banner {
        bottom: 80px; /* Above bottom nav */
        width: calc(100% - 32px);
        padding: 12px 16px;
    }
    
    .install-banner-content {
        gap: 10px;
    }
    
    .install-banner-content strong {
        font-size: 14px;
    }
    
    .install-banner-content p {
        font-size: 12px;
    }
    
    .btn-install {
        padding: 8px 16px;
        font-size: 13px;
    }
}


/* Card Detail Modal */
.modal-large {
    max-width: 95%;
    width: 1200px;
    max-height: 90vh;
}

.modal-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.modal-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    position: relative;
}

.modal-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
}

/* Make cards clickable */
.data-stat-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.data-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow);
}

.data-stat-card:active {
    transform: translateY(-2px);
}


/* ============================================
   DARK MODE STYLES
   ============================================ */

/* Dark mode variables */
body.dark-mode {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --secondary: #a78bfa;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --dark: #f1f5f9;
    --light: #1e293b;
    --gray: #cbd5e1;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.dark-mode {
    background: #0f172a;
    color: #f1f5f9;
}

body.dark-mode .sidebar {
    background: #1e293b;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .topbar {
    background: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

body.dark-mode .btn-toggle-sidebar {
    background: #334155;
    color: #fbbf24;
}

body.dark-mode .btn-toggle-sidebar svg {
    stroke: #fbbf24;
}

body.dark-mode .btn-toggle-sidebar:hover {
    background: #fbbf24;
    color: #1e293b;
}

body.dark-mode .btn-toggle-sidebar:hover svg {
    stroke: #1e293b;
}

body.dark-mode .user-name-display {
    background: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .user-name-display span {
    color: #f1f5f9;
}

body.dark-mode .btn-refresh {
    background: #334155;
    color: #fbbf24;
}

body.dark-mode .btn-refresh:hover {
    background: #fbbf24;
    color: #1e293b;
}

body.dark-mode .stat-card,
body.dark-mode .data-stat-card,
body.dark-mode .chart-container,
body.dark-mode .table-wrapper,
body.dark-mode .form-card,
body.dark-mode #pagination,
body.dark-mode #paginationKemiskinan,
body.dark-mode #paginationSarpras {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

body.dark-mode .chart-container h3 {
    color: #f1f5f9;
}

body.dark-mode .chartjs-legend,
body.dark-mode .chartjs-legend li,
body.dark-mode .chartjs-legend span {
    color: #fbbf24 !important;
}

body.dark-mode canvas {
    color: #fbbf24;
}

body.dark-mode .marquee-container {
    background: #1e293b !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .recent-input-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .recent-input-card h4 {
    color: #f1f5f9 !important;
}

body.dark-mode .recent-input-card b {
    color: #f1f5f9 !important;
}

body.dark-mode .recent-input-card div[style*="color: var(--gray)"] {
    color: #cbd5e1 !important;
}

body.dark-mode .pagination-controls {
    background: #1e293b;
    border-top-color: #334155;
}

body.dark-mode .pagination-info {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

body.dark-mode .pagination-btn,
body.dark-mode .btn-page {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .pagination-btn:hover:not(:disabled),
body.dark-mode .btn-page:hover:not(:disabled) {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

body.dark-mode .pagination-btn.active,
body.dark-mode .btn-page.active {
    background: var(--gradient);
    color: white;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

body.dark-mode .data-table thead {
    background: var(--gradient);
}

body.dark-mode .data-table th {
    background: var(--primary-dark);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .data-table thead tr:first-child th[colspan] {
    background: rgba(0,0,0,0.2);
}

body.dark-mode .data-table td {
    border-bottom: 1px solid #334155;
}

body.dark-mode .data-table tbody tr:hover {
    background: #334155;
}

body.dark-mode .modal-content {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .modal-header h2 {
    color: #f1f5f9;
}

body.dark-mode .modal-body {
    color: #e2e8f0;
}

body.dark-mode .modal-table-wrapper {
    background: #0f172a;
}

body.dark-mode .modal-table-wrapper table {
    color: #e2e8f0;
}

body.dark-mode .modal-table-wrapper th {
    background: var(--primary-dark);
    color: white;
}

body.dark-mode .modal-table-wrapper td {
    color: #e2e8f0;
    border-bottom-color: #334155;
}

body.dark-mode .modal-table-wrapper tbody tr:hover {
    background: #334155;
}

body.dark-mode .detail-section {
    background: #0f172a;
}

body.dark-mode .detail-section h3 {
    color: #f1f5f9;
}

body.dark-mode .detail-item {
    color: #e2e8f0;
}

body.dark-mode .detail-item label {
    color: #cbd5e1;
}

body.dark-mode .detail-item span {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .modal-footer {
    background: #0f172a;
}

body.dark-mode #cardDetailModal .modal-content {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode #cardDetailModal table {
    color: #e2e8f0;
}

body.dark-mode #cardDetailModal th {
    background: var(--primary-dark);
    color: white;
}

body.dark-mode #cardDetailModal td {
    color: #e2e8f0;
    border-bottom-color: #334155;
}

body.dark-mode #cardDetailModal tbody tr:hover {
    background: #334155;
}

body.dark-mode .modal-filters {
    background: #0f172a;
}

body.dark-mode .modal-filters input,
body.dark-mode .modal-filters select {
    background: #334155;
    color: #f1f5f9;
    border-color: #475569;
}

body.dark-mode .nav-item:hover {
    background: #334155;
}

body.dark-mode .bottom-nav {
    background: #1e293b;
    border-top: 1px solid #334155;
}

/* Scroll indicator gradient on bottom nav */
.bottom-nav::after {
    content: '';
    position: sticky;
    right: 0;
    top: 0;
    bottom: 0;
    width: 24px;
    min-width: 24px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
    pointer-events: none;
    flex-shrink: 0;
}

body.dark-mode .bottom-nav::after {
    background: linear-gradient(to right, transparent, rgba(30,41,59,0.9));
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea,
body.dark-mode .search-box input,
body.dark-mode .filter-select {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .info-section {
    background: #0f172a;
}

body.dark-mode .info-item span {
    background: #334155;
    border-color: #475569;
}

/* Dark mode text contrast fixes */
body.dark-mode .legend-item {
    color: #e2e8f0;
}

body.dark-mode .legend-text {
    color: #e2e8f0;
}

body.dark-mode .chart-legend {
    border-top-color: #334155;
}

body.dark-mode .marquee-text-content span {
    color: #cbd5e1 !important;
}

body.dark-mode .loading-cell {
    color: #cbd5e1 !important;
}

/* Theme Toggle Switch */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: var(--light);
    border-radius: 10px;
}

.theme-toggle svg {
    color: var(--gray);
    flex-shrink: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* ============================================
   ABOUT PAGE STYLES
   ============================================ */

/* CRITICAL: Force remove all padding for about page */
.page-content#aboutPage {
    padding: 0 !important;
    margin: 0 !important;
}

.page-content#aboutPage.active {
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure pagination is hidden when not in active page */
.page-content:not(.active) #pagination,
.page-content:not(.active) #paginationKemiskinan,
.page-content:not(.active) #paginationSarpras {
    display: none !important;
    visibility: hidden !important;
}

.about-container {
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.about-header {
    text-align: center;
    padding: 60px 40px;
    background: var(--gradient);
    border-radius: 0;
    color: white;
    margin: 0 !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    width: 100%;
}

.about-logo {
    width: 100px;
    height: 100px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.about-logo svg {
    color: white;
}

.about-header h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 6px;
}

.about-subtitle {
    font-size: 22px;
    margin-bottom: 12px;
    opacity: 0.95;
    font-weight: 500;
}

.about-version {
    font-size: 14px;
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    margin-top: 12px;
    backdrop-filter: blur(10px);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.about-section {
    background: white;
    padding: 50px 60px;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.about-section:last-child {
    border-bottom: none;
}

.section-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.about-section h2 {
    color: var(--primary);
    font-size: 28px;
    margin-bottom: 24px;
    font-weight: 700;
    text-align: center;
}

.about-section > p {
    color: var(--gray);
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 12px;
    max-width: 900px;
    text-align: center;
}

/* Theme Selector in Dashboard */
.theme-selector-dashboard {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.theme-options-dashboard {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.theme-btn-dashboard {
    background: white;
    border: 3px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
}

.theme-btn-dashboard:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.theme-btn-dashboard.active {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    background: rgba(102, 126, 234, 0.05);
}

.theme-btn-dashboard.active::after {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.theme-preview-dashboard {
    width: 100%;
    height: 80px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-btn-dashboard span {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

@media (max-width: 768px) {
    .theme-options-dashboard {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .theme-options-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 24px;
    max-width: 1200px;
    width: 100%;
}

.feature-card {
    padding: 28px 24px;
    background: var(--light);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px var(--shadow);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 44px;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 17px;
    color: var(--dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-card p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
}

.usage-steps {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1000px;
    width: 100%;
}

.step-card {
    display: flex;
    gap: 24px;
    padding: 28px;
    background: var(--light);
    border-radius: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.step-card:hover {
    transform: translateX(8px);
    box-shadow: 0 6px 16px var(--shadow);
}

.step-number {
    width: 52px;
    height: 52px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.step-content h3 {
    color: var(--dark);
    font-size: 19px;
    margin-bottom: 10px;
    font-weight: 600;
}

.step-content p {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.7;
}

.faq-container {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1200px;
    width: 100%;
}

.faq-card {
    padding: 24px;
    background: var(--light);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.faq-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px var(--shadow);
}

.faq-card h3 {
    color: var(--dark);
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.faq-card p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.7;
}

.about-footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
    font-size: 14px;
    background: var(--light);
    border-top: 1px solid var(--border);
    margin: 0;
}

.about-footer p {
    margin-bottom: 8px;
}

.creator-credit {
    margin-top: 12px;
    font-size: 13px;
}

.creator-credit a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.creator-credit a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Dark mode for about page */
body.dark-mode .about-section {
    background: #1e293b;
}

body.dark-mode .feature-card,
body.dark-mode .step-card,
body.dark-mode .faq-card {
    background: #0f172a;
}

body.dark-mode .feature-card:hover,
body.dark-mode .step-card:hover,
body.dark-mode .faq-card:hover {
    border-color: var(--primary);
}

/* Responsive for about page */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .faq-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .about-header {
        padding: 40px 24px;
    }
    
    .about-logo {
        width: 80px;
        height: 80px;
    }
    
    .about-header h1 {
        font-size: 40px;
        letter-spacing: 3px;
    }
    
    .about-subtitle {
        font-size: 18px;
    }
    
    .about-version {
        font-size: 12px;
        padding: 6px 16px;
    }
    
    .about-section {
        padding: 40px 24px;
    }
    
    .section-icon {
        font-size: 40px;
    }
    
    .about-section h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .about-section > p {
        font-size: 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 24px 20px;
    }
    
    .feature-icon {
        font-size: 40px;
    }
    
    .feature-card h3 {
        font-size: 16px;
    }
    
    .feature-card p {
        font-size: 14px;
    }
    
    .usage-steps {
        max-width: 100%;
    }
    
    .faq-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .faq-card {
        padding: 20px;
    }
    
    .faq-card h3 {
        font-size: 15px;
    }
    
    .faq-card p {
        font-size: 14px;
    }
    
    .step-card {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 16px;
    }
    
    .step-number {
        margin: 0 auto;
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .step-content h3 {
        font-size: 17px;
    }
    
    .step-content p {
        font-size: 14px;
    }
    
    .about-footer {
        padding: 32px 20px;
        font-size: 13px;
    }
    
    .creator-credit {
        font-size: 12px;
    }
}

/* Dark mode for about page */
body.dark-mode .about-section {
    background: #1e293b;
    border-bottom-color: #334155;
}

body.dark-mode .about-footer {
    background: #1e293b;
    border-top-color: #334155;
}

body.dark-mode .feature-card,
body.dark-mode .step-card,
body.dark-mode .faq-card {
    background: #0f172a;
}

body.dark-mode .feature-card:hover,
body.dark-mode .step-card:hover,
body.dark-mode .faq-card:hover {
    border-color: var(--primary);
}

body.dark-mode .creator-credit a {
    color: var(--primary);
}

body.dark-mode .creator-credit a:hover {
    color: var(--secondary);
}

/* ============================================
   REKAP DATA PAGE STYLES
   ============================================ */

.rekap-container {
    width: 100%;
    padding: 24px 0 0 0;
    margin: 0;
    min-height: 100vh;
    background: #f1f5f9;
}

.rekap-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 16px;
    margin-top: 0;
    padding: 0 32px;
}

.rekap-stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.rekap-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow);
}

.rekap-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rekap-stat-icon.blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rekap-stat-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.rekap-stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.rekap-stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.rekap-stat-icon svg {
    color: white;
}

.rekap-stat-info {
    flex: 1;
    min-width: 0;
}

.rekap-stat-label {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
    margin-bottom: 4px;
}

.rekap-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.rekap-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: flex-end;
    padding: 0 32px;
}

/* Rekap Filters */
.rekap-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 32px;
}

.rekap-search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.rekap-search-box svg {
    position: absolute;
    left: 16px;
    color: var(--gray);
}

.rekap-search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.rekap-search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.rekap-filter-select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.rekap-filter-select:hover {
    border-color: var(--primary);
}

.rekap-filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.rekap-table-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    width: calc(100% - 64px);
    margin: 0 32px 32px 32px;
    position: relative;
    overflow-x: auto;
}

.rekap-table-scroll {
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.rekap-table-scroll-x {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.rekap-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.rekap-table thead {
    background: var(--gradient);
    color: white;
}

.rekap-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    vertical-align: middle;
    background: var(--primary);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.rekap-table th:first-child {
    width: 50px;
    min-width: 50px;
}

.rekap-table th:nth-child(2) {
    min-width: 350px;
}

.rekap-table th:nth-child(3),
.rekap-table th:nth-child(4),
.rekap-table th:nth-child(5),
.rekap-table th:nth-child(6) {
    min-width: 140px;
}

.rekap-table th:nth-child(7) {
    min-width: 80px;
}

.rekap-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
    white-space: nowrap;
}

.rekap-table td:nth-child(2) {
    white-space: normal;
    word-wrap: break-word;
}

.rekap-table tbody tr {
    transition: all 0.2s ease;
}

.rekap-table tbody tr:hover {
    background: var(--light);
}

/* Rekap Pagination */
.rekap-pagination {
    padding: 20px;
    background: white;
    border-top: 1px solid var(--border);
}

/* Hide rekap pagination when empty */
.rekap-pagination:empty,
#rekapPagination:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.rekap-pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.rekap-pagination-info {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

.rekap-pagination-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rekap-pagination-btn {
    padding: 8px 12px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    transition: all 0.3s ease;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rekap-pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.rekap-pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.rekap-pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rekap-pagination-dots {
    color: var(--gray);
    padding: 0 4px;
}

/* Expand/Collapse Styles */
.rekap-row-program {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 700;
    cursor: pointer;
    border-left: 4px solid var(--primary);
}

.rekap-row-program:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rekap-row-kegiatan {
    background: #ffffff;
    font-weight: 600;
    cursor: pointer;
    border-left: 4px solid var(--success);
}

.rekap-row-kegiatan td:nth-child(2) {
    padding-left: 50px;
}

.rekap-row-kegiatan:hover {
    background: #f8fafc;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.rekap-row-subkegiatan {
    background: #fafafa;
    font-weight: 500;
    cursor: pointer;
    border-left: 4px solid var(--warning);
}

.rekap-row-subkegiatan td:nth-child(2) {
    padding-left: 80px;
}

.rekap-row-subkegiatan:hover {
    background: #f5f5f5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.rekap-row-akun {
    background: #f0f4f8;
    font-weight: 450;
    cursor: pointer;
    border-left: 4px solid #3b82f6;
}

.rekap-row-akun td:nth-child(2) {
    padding-left: 110px;
}

.rekap-row-akun:hover {
    background: #e6edf5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rekap-row-detail {
    background: #f9fafb;
    font-weight: 400;
    font-size: 13px;
}

.rekap-row-detail td:nth-child(2) {
    padding-left: 140px;
}

.rekap-row-detail:hover {
    background: #f3f4f6;
}

.expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.expand-icon.expanded {
    transform: rotate(90deg);
    background: var(--success);
}

.expand-icon svg {
    width: 16px;
    height: 16px;
}

.rekap-row-hidden {
    display: none;
}

/* Detail info styling */
.detail-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-info .detail-main {
    font-weight: 500;
    color: var(--dark);
}

.detail-info .detail-sub {
    font-size: 12px;
    color: var(--gray);
    font-style: italic;
}

/* Dark mode for rekap page */
body.dark-mode .rekap-container {
    background: #0f172a;
}

body.dark-mode .rekap-stat-card,
body.dark-mode .rekap-table-wrapper {
    background: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .rekap-table thead {
    background: var(--gradient);
}

body.dark-mode .rekap-table th {
    background: var(--primary-dark);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .rekap-table td {
    border-bottom: 1px solid #334155;
}

body.dark-mode .rekap-row-program {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-left-color: var(--primary);
}

body.dark-mode .rekap-row-program:hover {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark-mode .rekap-row-kegiatan {
    background: #1e293b;
    border-left-color: var(--success);
}

body.dark-mode .rekap-row-kegiatan:hover {
    background: #334155;
}

body.dark-mode .rekap-row-subkegiatan {
    background: #0f172a;
    border-left-color: var(--warning);
}

body.dark-mode .rekap-row-subkegiatan:hover {
    background: #1e293b;
}

body.dark-mode .rekap-row-akun {
    background: #0a1628;
    border-left-color: #3b82f6;
}

body.dark-mode .rekap-row-akun:hover {
    background: #0f172a;
}

body.dark-mode .rekap-row-detail {
    background: #0a0f1a;
}

body.dark-mode .rekap-row-detail:hover {
    background: #0f172a;
}

body.dark-mode .rekap-search-box input,
body.dark-mode .rekap-filter-select {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .rekap-pagination {
    background: #1e293b;
    border-top-color: #334155;
}

body.dark-mode .rekap-pagination-btn {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .rekap-pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
}

body.dark-mode .rekap-pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Responsive for rekap page */
@media (max-width: 1024px) {
    .rekap-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rekap-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rekap-search-box {
        min-width: 100%;
    }
    
    .rekap-filter-select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .rekap-container {
        padding: 16px 0 0 0;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .rekap-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 16px;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .rekap-stat-card {
        min-width: 0;
    }
    
    .rekap-stat-label {
        font-size: 13px;
    }
    
    .rekap-stat-value {
        font-size: 20px;
        word-break: break-word;
    }
    
    .rekap-actions {
        flex-direction: column;
        padding: 0 16px;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .rekap-filters {
        flex-direction: column;
        padding: 0 16px;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .rekap-table-wrapper {
        width: calc(100% - 32px);
        margin: 0 16px 24px 16px;
        border-radius: 12px;
    }
    
    .rekap-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .rekap-table {
        min-width: 900px;
    }
    
    .rekap-table th,
    .rekap-table td {
        font-size: 13px;
    }
    
    .rekap-table th:first-child,
    .rekap-table td:first-child {
        padding-left: 8px;
    }
    
    .rekap-pagination-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .rekap-pagination-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .rekap-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .rekap-stat-card {
        width: 100%;
        min-width: 0;
    }
    
    .btn-export {
        width: 100%;
        justify-content: center;
    }
    
    .rekap-filter-select {
        width: 100%;
    }
}

/* Dashboard Charts & Widgets Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Scrollbar for Recent List */
#recentInputList::-webkit-scrollbar {
    width: 6px;
}
#recentInputList::-webkit-scrollbar-track {
    background: transparent;
}
#recentInputList::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
#recentInputList::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}


/* ============================================
   OVERFLOW FIX - ENSURE NO HORIZONTAL SCROLL
   ============================================ */

/* Global overflow prevention */
html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.dashboard-page {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Ensure all major containers don't overflow */
.main-content,
.content-area,
.page-content,
.stats-grid,
.data-stats-grid,
.charts-grid,
.table-controls,
.table-wrapper,
.form-card,
.chart-container,
.modal-content,
.about-container,
.rekap-container {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Marquee container fix */
.marquee-container {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Table wrapper ensure horizontal scroll only within */
.table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* Sticky floating thead clone */
.sticky-thead-clone {
    position: fixed;
    z-index: 49;
    overflow-x: hidden; /* scroll dikendalikan JS, bukan user */
    overflow-y: hidden;
    pointer-events: none;
    box-shadow: 0 3px 8px rgba(0,0,0,0.18);
    background: var(--primary);
}
.sticky-thead-clone table {
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
    /* lebar tabel diset via JS sesuai tabel asli */
}
.sticky-thead-clone th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 13px;
    padding: 12px 16px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    white-space: nowrap;
    vertical-align: middle;
    overflow: hidden;
}
body.dark-mode .sticky-thead-clone,
body.dark-mode .sticky-thead-clone th {
    background: var(--primary-dark);
}

/* Prevent text overflow */
.stat-value,
.data-stat-value,
.rekap-stat-value {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Ensure buttons don't cause overflow */
.btn-export,
.btn-reset-filter,
.btn-submit,
.btn-reset {
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix for filters row */
.filters-row {
    max-width: 100%;
    overflow: visible;
}

/* Pagination fix */
#pagination,
#paginationKemiskinan,
.rekap-pagination {
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

/* Chart container fix */
.chart-area {
    max-width: 100%;
    overflow: visible;
}

.chart-area canvas {
    max-width: 100% !important;
    height: auto !important;
}

/* Responsive grid fix */
@media (max-width: 1200px) {
    .filters-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .filters-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    /* Ensure mobile doesn't overflow */
    .main-content {
        width: 100vw;
        max-width: 100vw;
    }
    
    .topbar {
        width: 100vw;
        max-width: 100vw;
        left: 0;
    }
    
    .content-area {
        width: 100%;
        max-width: 100%;
        padding: 16px;
    }
    
    /* Table horizontal scroll on mobile */
    .table-wrapper {
        margin: 0 -16px;
        width: calc(100% + 32px);
        max-width: calc(100% + 32px);
        padding: 0 16px;
    }
}

/* Rekap page specific fixes */
.rekap-stats-grid,
.rekap-filters,
.rekap-actions {
    max-width: 100%;
    box-sizing: border-box;
}

.rekap-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

/* About page fix */
.about-header,
.about-section,
.about-footer {
    max-width: 100%;
    box-sizing: border-box;
}

.features-grid,
.usage-steps,
.faq-container {
    max-width: 100%;
    box-sizing: border-box;
}


/* ============================================
   CARD DETAIL MODAL STYLES
   ============================================ */

.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.detail-table thead {
    background: var(--primary);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.detail-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-table td {
    padding: 10px 8px;
    border: 1px solid var(--border);
    text-align: left;
}

.detail-table tbody tr:nth-child(even) {
    background: var(--light-bg);
}

.detail-table tbody tr:hover {
    background: rgba(52, 152, 219, 0.1);
}

.detail-table td:first-child {
    text-align: center;
    font-weight: 600;
    color: var(--gray);
}

.detail-table td:nth-last-child(1),
.detail-table td:nth-last-child(2),
.detail-table td:nth-last-child(3) {
    text-align: right;
}

#cardDetailContent {
    padding: 10px;
}

/* Responsive table for card details */
@media (max-width: 768px) {
    .detail-table {
        font-size: 13px;
    }
    
    .detail-table th,
    .detail-table td {
        font-size: 13px;
    }
}

/* ========================================
   INFOGRAFIS PAGE STYLES
   ======================================== */

.infografis-controls {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 24px;
}

.infografis-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.infografis-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.infografis-stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.infografis-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow);
}

.infografis-stat-card .stat-change {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.infografis-stat-card .stat-change.positive {
    color: var(--success);
}

.infografis-stat-card .stat-change.negative {
    color: var(--danger);
}

.infografis-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.infografis-progress-section {
    margin-bottom: 24px;
}

.progress-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.progress-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
}

.progress-card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid var(--border);
}

.progress-card-header svg {
    width: 24px;
    height: 24px;
}

.progress-card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.progress-fast .progress-card-header {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border-bottom: none;
}

.progress-fast .progress-card-header h3 {
    color: white;
}

.progress-slow .progress-card-header {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: white;
    border-bottom: none;
}

.progress-slow .progress-card-header h3 {
    color: white;
}

.progress-list {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.progress-item {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.progress-item:last-child {
    border-bottom: none;
}

.progress-item:hover {
    background: var(--light);
}

.progress-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-item-title {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.progress-item-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.progress-fast .progress-item-badge {
    background: #d1fae5;
    color: #065f46;
}

.progress-slow .progress-item-badge {
    background: #fef3c7;
    color: #92400e;
}

.progress-item-details {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.6;
}

.progress-item-bar {
    margin-top: 8px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-item-bar-fill {
    height: 100%;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.progress-fast .progress-item-bar-fill {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.progress-slow .progress-item-bar-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

/* Trend Badge */
.trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.trend-badge.trend-up {
    background: #d1fae5;
    color: #065f46;
}

.trend-badge.trend-down {
    background: #fef3c7;
    color: #92400e;
}

.trend-badge.trend-stable {
    background: #e0e7ff;
    color: #3730a3;
}

.trend-badge svg {
    width: 14px;
    height: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .infografis-filters {
        flex-direction: column;
    }
    
    .infografis-filters .search-box,
    .infografis-filters .filter-select,
    .infografis-filters .btn-reset-filter {
        width: 100%;
    }
    
    .infografis-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-analysis-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode Support */
body.dark-mode .infografis-controls,
body.dark-mode .infografis-stat-card,
body.dark-mode .progress-card {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .progress-card-header h3,
body.dark-mode .progress-item-title {
    color: #f1f5f9;
}

body.dark-mode .progress-item {
    border-bottom-color: #334155;
}

body.dark-mode .progress-item:hover {
    background: #334155;
}

/* ========================================
   RESPONSIVE ORIENTATION SUPPORT
   Support untuk Portrait & Landscape Mode
   ======================================== */

/* Landscape Mode - Smartphone */
@media screen and (max-width: 896px) and (orientation: landscape) {
    /* Adjust sidebar untuk landscape */
    .sidebar {
        width: 60px;
    }
    
    .sidebar-header h2,
    .nav-item span,
    .user-details,
    .btn-logout span,
    .btn-install-app span,
    .theme-toggle {
        display: none;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .topbar {
        left: 60px;
        width: calc(100% - 60px);
        padding: 12px 20px;
    }
    
    .topbar h1 {
        font-size: 18px;
    }
    
    .loading-progress-bar {
        left: 60px;
        top: 60px;
    }
    
    .content-area {
        margin-top: 60px;
        padding: 12px 20px;
    }
    
    /* Compact stats grid untuk landscape */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .stat-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* Charts lebih compact */
    .charts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .chart-container {
        padding: 16px;
    }
    
    .chart-area {
        height: 200px;
    }
    
    /* Table adjustments */
    .table-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .table-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Form adjustments */
    .form-card {
        padding: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* Portrait Mode - Smartphone */
@media screen and (max-width: 768px) and (orientation: portrait) {
    /* Sidebar collapsed by default */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        position: fixed;
        z-index: 200;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Overlay when sidebar is open */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 280px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .topbar {
        left: 0;
        width: 100%;
    }
    
    .loading-progress-bar {
        left: 0;
    }
    
    /* Stats grid - 2 columns */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-icon {
        width: 44px;
        height: 44px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    /* Charts - single column */
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    /* Table - horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 1200px;
    }
    
    /* Form - single column */
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Tablet Landscape */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
    
    .topbar {
        left: 240px;
        width: calc(100% - 240px);
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .charts-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tablet Portrait */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-header h2,
    .nav-item span,
    .user-details,
    .btn-logout span,
    .btn-install-app span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .topbar {
        left: 70px;
        width: calc(100% - 70px);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Prevent horizontal scroll on all orientations */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.dashboard-page {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Smooth transition when rotating device */
@media screen and (max-width: 1024px) {
    .sidebar,
    .main-content,
    .topbar,
    .stats-grid,
    .charts-grid {
        transition: all 0.3s ease;
    }
}

/* Login page - responsive untuk semua orientasi */
@media screen and (max-width: 896px) and (orientation: landscape) {
    .login-container {
        max-width: 600px;
    }
    
    .login-card {
        padding: 24px 32px;
    }
    
    .logo-circle {
        width: 70px;
        height: 70px;
        margin-bottom: 16px;
    }
    
    .logo-circle img {
        width: 80px !important;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .theme-selector {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .theme-options {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .theme-preview {
        height: 30px;
    }
}

/* About page - responsive */
@media screen and (max-width: 896px) and (orientation: landscape) {
    .about-container {
        padding: 20px;
    }
    
    .about-header {
        padding: 20px;
    }
    
    .about-logo img {
        width: 60px !important;
        height: 60px !important;
    }
    
    .about-section {
        padding: 16px;
    }
}

/* Modal - responsive untuk semua orientasi */
@media screen and (max-width: 896px) and (orientation: landscape) {
    .modal-content {
        max-height: 85vh;
        width: 95%;
    }
    
    .modal-header {
        padding: 16px 24px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .detail-section {
        padding: 12px;
        margin-bottom: 16px;
    }
}

/* Ensure touch-friendly tap targets on mobile */
@media screen and (max-width: 1024px) {
    .btn-refresh,
    .btn-toggle-sidebar,
    .nav-item,
    .theme-btn {
        min-width: 44px;
        min-height: 44px;
    }
}


/* ========================================
   KELOLA ANGGARAN STYLES
   ======================================== */

.btn-edit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-edit svg {
    width: 16px;
    height: 16px;
}

/* Modal Styles Enhancement */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: var(--gradient);
    color: white;
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

/* Form Styles in Modal */
.modal-body .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.modal-body .form-group input:focus,
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-body .form-group input[readonly] {
    background: #f3f4f6;
    cursor: not-allowed;
}

.modal-body .form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--gray);
}

.modal-body .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Dark Mode for Kelola Anggaran */
body.dark-mode .btn-edit {
    background: #3b82f6;
}

body.dark-mode .btn-edit:hover {
    background: #2563eb;
}

body.dark-mode .modal-content {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .modal-body .form-group label {
    color: #f1f5f9;
}

body.dark-mode .modal-body .form-group input,
body.dark-mode .modal-body .form-group select,
body.dark-mode .modal-body .form-group textarea {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .modal-body .form-group input[readonly] {
    background: #334155;
    color: #94a3b8;
}

body.dark-mode .modal-body .form-actions {
    border-top-color: #334155;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 85vh;
    }
    
    .modal-body .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
}
/* Autocomplete Styles */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background-color: #f8fafc;
}

.autocomplete-item.selected {
    background-color: var(--primary);
    color: white;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item .akun-code {
    font-weight: 600;
    color: var(--primary);
    font-size: 12px;
    display: block;
    margin-bottom: 2px;
}

.autocomplete-item .akun-name {
    color: var(--dark);
    font-size: 14px;
}

.autocomplete-item.selected .akun-code,
.autocomplete-item.selected .akun-name {
    color: white;
}

.autocomplete-no-results {
    padding: 12px 16px;
    color: var(--gray);
    font-style: italic;
    text-align: center;
    font-size: 14px;
}

/* Input with autocomplete styling */
.form-group.autocomplete-enabled input {
    border-radius: 8px 8px 0 0;
}

.form-group.autocomplete-enabled input:focus + .autocomplete-dropdown,
.autocomplete-dropdown.show {
    display: block;
}

/* Loading state for autocomplete */
.autocomplete-loading {
    padding: 12px 16px;
    text-align: center;
    color: var(--gray);
    font-size: 14px;
}

.autocomplete-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Modal Security Enhancement - Prevent accidental close */
#modalEditAnggaran .modal-content,
#modalTambahAnggaran .modal-content {
    position: relative;
}

/* Enhanced close button visibility for secure modals */
#modalEditAnggaran .modal-close,
#modalTambahAnggaran .modal-close {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transition: all 0.2s ease;
}

#modalEditAnggaran .modal-close:hover,
#modalTambahAnggaran .modal-close:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Security indicator for form modals */
#modalEditAnggaran .modal-header::after,
#modalTambahAnggaran .modal-header::after {
    content: "🔒";
    position: absolute;
    top: 8px;
    right: 50px;
    font-size: 12px;
    opacity: 0.6;
    pointer-events: none;
}
/* Enhanced Pagination Styles */
.pagination-first,
.pagination-last {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: white !important;
    border: none !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-first:hover:not(:disabled),
.pagination-last:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.pagination-first:disabled,
.pagination-last:disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    color: var(--gray);
    font-weight: 600;
    font-size: 14px;
    user-select: none;
    margin: 0 4px;
}

/* Responsive pagination for mobile */
@media (max-width: 768px) {
    .pagination-buttons {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px;
        font-size: 12px;
    }
    
    .pagination-ellipsis {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    /* Hide some page numbers on mobile */
    .pagination-btn:not(.active):not(.pagination-first):not(.pagination-last):nth-child(n+6):nth-child(-n+10) {
        display: none;
    }
}

/* Tooltip enhancement for pagination buttons */
.pagination-first::after {
    content: "Ke halaman pertama";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

.pagination-last::after {
    content: "Ke halaman terakhir";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

.pagination-first:hover::after,
.pagination-last:hover::after {
    opacity: 1;
}

/* ===================================
   RIWAYAT PERUBAHAN STYLES
   =================================== */

/* Detail Header Styles */
.detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    color: white;
}

.detail-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.detail-info-row:last-child {
    margin-bottom: 0;
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 500;
}

.detail-value {
    font-size: 16px;
    font-weight: 600;
}

/* Perubahan Section */
.perubahan-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.perubahan-section h4 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Comparison Row */
.comparison-row {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row:hover {
    background: #f8fafc;
}

.comparison-label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    font-size: 14px;
}

.comparison-values {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
}

.value-old, .value-new {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
}

.value-old {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.value-new {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.value-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.value-badge.old {
    color: #dc2626;
}

.value-badge.new {
    color: #16a34a;
}

.value-text {
    font-size: 14px;
    color: var(--text);
    word-break: break-word;
}

.comparison-arrow {
    font-size: 24px;
    color: var(--primary);
    font-weight: bold;
}

/* Field Display for New Data */
.perubahan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.field-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.field-label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

.field-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

/* Page Header */
.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
}

/* Responsive */
@media (max-width: 768px) {
    .detail-info-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .comparison-values {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
        text-align: center;
    }
    
    .perubahan-grid {
        grid-template-columns: 1fr;
    }
}
