:root {
    --bg-main: #07403A;
    --bg-surface: #ffffff;
    --accent: #F6D64A;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --text-on-main: #ffffff;
    --text-on-surface: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --input-bg: #ffffff;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-on-main);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent);
}

.text-center {
    text-align: center;
}

.text-danger {
    color: var(--danger-dark);
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.card,
.create-card,
.dashboard-card,
.chart-card,
.stat-card,
.modal-content {
    background-color: var(--bg-surface);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    color: var(--text-on-surface);
}

.table-container {
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.dashboard-card {
    margin-bottom: 2rem;
    overflow: hidden;
}

.stat-card {
    border-top: 4px solid #e2e8f0;
    padding: 1.2rem;
}

.chart-card {
    padding: 1.5rem;
}

.create-card {
    padding: 2.5rem;
    min-width: 960px;
    box-sizing: border-box;
}

.card-auth {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
}

.card-empty {
    padding: 3rem;
    text-align: center;
    border: 2px dashed #d1d5db;
    background-color: var(--bg-surface);
    border-radius: 0.75rem;
    color: var(--text-on-surface);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-main);
    margin-bottom: 1.5rem;
    text-align: center;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.empty-subtitle {
    color: var(--text-muted);
}

.alert-danger {
    background-color: #fef2f2;
    color: var(--danger-dark);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
}

.badge {
    background-color: var(--bg-main);
    color: var(--accent);
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
    border: 1px solid var(--accent);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-on-surface);
    margin-bottom: 0.35rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: #f9fafb;
    color: var(--text-on-surface);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(246, 74, 74, 0.2);
    background-color: #fff;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    display: block;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-main);
    border: 2px solid var(--bg-main);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--bg-main);
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-logout {
    background: none;
    border: none;
    font-size: 0.875rem;
    color: #ffffff;
    opacity: 0.8;
    transition: all 0.2s;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    color: var(--accent);
    opacity: 1;
    text-shadow: 0 0 10px rgba(246, 214, 74, 0.5);
}


.navbar {
    height: auto;
    min-height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    padding: 1.5rem 2rem;
    border-bottom: none;
    color: var(--text-on-main);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    top: 0;
    z-index: 900;
}

.nav-brand {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #ffffff;
}

.nav-separator {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 1.2rem;
}

.nav-badge {
    background: rgba(246, 214, 74, 0.2);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 2px;
    display: inline-block;
}

.container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.layout-wrapper {
    display: flex;
    height: auto;
    min-height: 100vh;
    overflow: visible;
}

.main-content {
    flex: 1;
    display: flex;
    margin-left: 260px;
    width: calc(100% - 260px);
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    background-color: var(--bg-main);
    transition: all 0.3s ease-in-out;
}

.main-content h3,
.main-content h4 {
    color: var(--bg-main);
}

.page-header-title {
    color: var(--text-on-main);
}


.custom-table {
    width: 100%;
    border-collapse: collapse;
}

.custom-table th,
.custom-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-on-surface);
}

.custom-table th {
    background-color: #f8fafc;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:hover td {
    background-color: #dbdbdb;
}

.sidebar {
    width: 260px;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--bg-main);
    z-index: 1050;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    flex-shrink: 0;
    width: 100%;
    z-index: 2;
    padding: 15px 10px;
    background-color: var(--bg-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header img {
    max-width: 100%;
    height: 70px;
    object-fit: contain;
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    width: 100%;
    min-height: 0;
    padding-bottom: 2rem;
}

.sidebar-link {
    display: block;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 600;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
    font-size: 0.9rem;
    border: 1px solid transparent;
    z-index: 2;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(5px);
    border-left: 3px solid var(--text-on-main);
}

.sidebar-link.active {
    background-color: var(--accent);
    color: var(--bg-main);
    font-weight: 800;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--text-on-main);
}

.sidebar-footer-link {
    color: var(--accent);
    border: 1px solid var(--accent);
    background: transparent;
    flex-shrink: 0;
    width: 100%;
    z-index: 2;
}

.sidebar-footer-link:hover {
    background: var(--accent);
    color: var(--bg-main);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.compact-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.compact-content {
    background-color: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    padding: 0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalPopUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow: hidden;
}

@keyframes modalPopUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    background-color: #f8fafc;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bg-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
}

.compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}

.compact-grid .form-group {
    margin-bottom: 0;
}

.compact-grid .form-label {
    font-size: 0.8rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.compact-grid .form-control {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

.disabled-select {
    background-color: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.modal-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-save {
    background: var(--bg-main);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-save:hover {
    opacity: 0.9;
}

.btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #e2e8f0;
}

.kpi-wrapper {
    display: none;
    transition: all 0.3s ease;
}

.kpi-wrapper.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes swing {
    0% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(5deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-login {
    background-color: var(--bg-surface);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 4px solid var(--accent);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    width: 90%;
    display: flex;
    flex-direction: column;
}

.login-header {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 2.5rem;
    color: var(--bg-main);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
    display: block;
}

.login-title {
    color: var(--bg-main);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 250px;
    background-color: var(--bg-surface);
    border: 4px solid var(--accent);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.5);
    border-color: var(--accent);
}

.project-desc {
    font-size: 1rem;
    color: var(--text-on-surface);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.section-header h2 {
    color: var(--accent);
    font-weight: 800;
    font-size: 2rem;
}

.section-header p {
    color: var(--text-on-main);
    font-size: 1rem;
}

.logo-wrapper {
    width: 100px;
    height: 100px;
    background-color: var(--bg-main);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--accent);
    overflow: hidden;
}

.logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    font-size: 4rem;
    font-weight: 800;
    color: var(--accent);
}

.alert-overdue {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.alert-icon-danger {
    background-color: var(--danger);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-overdue h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 700;
}

.alert-overdue p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.alert-pic-list {
    margin-top: 8px;
    font-size: 0.85rem;
    background-color: rgba(255, 255, 255, 0.6);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #fca5a5;
}

.alert-pending {
    background-color: #fff7ed;
    border: 1px solid #ffedd5;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(251, 146, 60, 0.05);
}

.alert-icon-warning {
    background-color: #f97316;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-title {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 700;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.stat-total {
    border-top-color: #0f172a;
}

.stat-tidak-prospek {
    border-top-color: #94a3b8;
}

.stat-cold {
    border-top-color: #3b82f6;
}

.stat-warm {
    border-top-color: #f59e0b;
}

.stat-hot {
    border-top-color: #ef4444;
}

.stat-gagal {
    border-top-color: #7f1d1d;
}

.chart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}



.chart-title {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 700;
}

.chart-container {
    height: 250px;
    position: relative;
}

.dashboard-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: #1e293b;
}

.universal-filter {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.filter-select-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.dashboard-content-area {
    width: 100%;
}

@media (min-width: 769px) {
    .dashboard-content-area {
        min-width: 960px;
    }
}


.select-icon {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    pointer-events: none;
    opacity: 0.6;
}

.badge-kpi-success {
    background: #dcfce7;
    color: #166534;
}

.badge-kpi-warning {
    background: #ffedd5;
    color: #9a3412;
}

.badge-kpi-danger {
    background: #fee2e2;
    color: #991b1b;
}

.select-status {
    font-size: 0.7rem;
    padding: 2px 20px 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    font-weight: 600;
    width: auto;
    transition: all 0.2s;
}

.status-cold-lead {
    background: #bae6fd;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.status-warm-lead {
    background: #fde68a;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.status-hot-prospek {
    background: #fecdd3;
    color: #be123c;
    border: 1px solid #fb7185;
}

.status-deal {
    background: #a7f3d0;
    color: #064e3b;
    border: 1px solid #34d399;
}

.status-gagal-closing {
    background: #a61b1b;
    color: #ffffff;
    border: 1px solid #7f1d1d;
}

.status-tidak-prospek {
    background: #cbd5e1;
    color: #1e293b;
    border: 1px solid #94a3b8;
}

.status-default {
    background: #e2e8f0;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-alert-action {
    background: #ea580c;
    color: white;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.2);
}

.btn-alert-action:hover {
    background: #c2410c;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-on-main);
    margin-right: 15px;
}

.close-sidebar-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1002;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebarOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    cursor: pointer;
}

.sidebarOverlay.active {
    display: block;
}

.custom-pagination-wrapper {
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.custom-pagination-wrapper nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.custom-pagination-wrapper p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.custom-pagination-wrapper .relative.z-0.inline-flex,
.custom-pagination-wrapper ul.pagination {
    display: inline-flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    box-shadow: none;
}

.custom-pagination-wrapper a,
.custom-pagination-wrapper span[aria-disabled="true"] span,
.custom-pagination-wrapper span[aria-current="page"] span,
.custom-pagination-wrapper .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.custom-pagination-wrapper a:hover,
.custom-pagination-wrapper .page-link:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

.custom-pagination-wrapper span[aria-current="page"] span,
.custom-pagination-wrapper .active .page-link {
    background: var(--bg-main);
    color: #ffffff;
    border-color: var(--bg-main);
    z-index: 2;
}

.custom-pagination-wrapper svg {
    width: 1.2rem;
    height: 1.2rem;
}

.btn-reset-filter {
    background-color: #fee2e2;
    color: var(--danger);
    border: 1px solid #fecaca;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-reset-filter:hover {
    background-color: #fecaca;
    color: var(--danger-dark);
    border-color: #fca5a5;
    transform: translateY(-1px);
}

.btn-reset-filter:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-reset-filter i {
    font-size: 0.9rem;
}

::-webkit-scrollbar {
    width: 3px;
    height: 5px;
}

::-webkit-scrollbar-button {
    display: none;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.sidebar-dropdown .dropdown-content {
    background-color: rgba(0, 0, 0, 0.2);
    margin-left: -20px;
    margin-right: -20px;
    padding-top: 8px;
    padding-bottom: 8px;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.1), inset 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-dropdown .dropdown-content .sub-link {
    margin: 0;
    border-radius: 0;
    padding-left: 2.5rem;
}

.ts-wrapper {
    z-index: 10;
}

.ts-dropdown {
    z-index: 9999;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    appearance: textfield;
}

.input-tengah {
    width: 100%;
    border: none;
    outline: none;
    font-weight: bold;
    font-size: inherit;
    font-family: inherit;
    background: transparent;
    text-align: center;
    padding: 0;
    margin: 0;
}

@media print {

    @page {
        size: A4 portrait;
        margin: 4mm;
    }

    .resp-table-detail table {
        table-layout: fixed !important;
        width: 100% !important;
    }

    .cb-col-bulan {
        width: 25% !important;
        word-wrap: break-word !important;
    }

    .cb-col-a,
    .cb-col-b,
    .cb-col-c {
        display: table-cell !important;
        width: 25% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    html,
    body {
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        overflow: visible !important;

        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .layout-wrapper,
    .main-content,
    .container,
    .container-fluid,
    .sim-print-area,
    .sim-wrapper,
    .card {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
        border: none !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .sidebar,
    .sidebar-overlay,
    .navbar,
    .dashboard-header-panel,
    #btn-download-pdf,
    .module-tabs,
    .tox,
    .tox-tinymce {
        display: none !important;
    }

    .sim-print-area {
        width: 100% !important;
    }

    table {
        border-collapse: collapse !important;
        page-break-inside: avoid !important;
    }

    tr,
    td,
    th {
        page-break-inside: avoid !important;
        break-inside: avoid !important;

        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body,
    table,
    td,
    th,
    input,
    select,
    span,
    div {
        font-size: 10px !important;
        line-height: 1.1 !important;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    p {
        margin: 0 !important;
        padding: 0 !important;
    }

    input,
    select {
        border: none !important;
        background: transparent !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
    }

    .kpr-layout-wrapper {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        gap: 10px !important;
        width: 100% !important;

        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .kpr-col-input {
        width: 58% !important;
    }

    .kpr-hasil-wrapper {
        width: 42% !important;
    }

    .kpr-bottom-wrapper {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        gap: 10px !important;
        width: 100% !important;

        margin-top: 8px !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;

        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .kpr-col-konsumen {
        width: 68% !important;
    }

    .kpr-col-gaji {
        width: 32% !important;
    }

    .tabel-harga-wrapper {
        margin-bottom: 8px !important;
    }

    #wrapper_tabel_konsumen,
    #wrapper_tabel_gaji,
    .kpr-layout-wrapper,
    .kpr-bottom-wrapper {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    #out_kemungkinan_text {
        font-weight: bold !important;
        border-radius: 3px !important;
        padding: 2px 6px !important;
    }

    div[style*="height: 20px"] {
        display: none !important;
    }

    div[style*="background: #ffffcc"],
    div[style*="background-color: #ffffcc"] {
        background-color: #ffffcc !important;
        display: inline-block !important;

        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .card>div:last-child {
        page-break-inside: avoid !important;
        break-inside: avoid !important;

        margin-top: 2px !important;
        margin-bottom: 0 !important;

        padding-top: 4px !important;
        padding-bottom: 4px !important;

        font-size: 8px !important;
        line-height: 1.05 !important;
    }

    .sim-print-area,
    .sim-wrapper,
    .card {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    body::after {
        display: none !important;
        content: none !important;
    }
}

.layout-wrapper {
    overflow-x: hidden;
    max-width: 100vw;
}

.main-content {
    overflow-x: hidden;
    min-width: 0;
}

.container {
    max-width: 100%;
    overflow-x: hidden;
    padding: 1rem;
}

.sim-wrapper {
    width: 100%;
    padding: 0 12px;
    margin: 0 auto;
    max-width: 1000px;
    box-sizing: border-box;
}

.tabel-harga-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kpr-layout-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.kpr-col-input {
    flex: 1 1 300px;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kpr-hasil-wrapper {
    flex: 0 0 auto;
    width: 100%;
    max-width: 360px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kpr-bottom-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    font-size: 14px;
    margin-bottom: 20px;
}

.kpr-col-konsumen {
    flex: 1 1 0;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kpr-col-gaji {
    flex: 0 0 320px;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.resp-table-summary {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


.resp-table-detail {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {

    .create-card {
        min-width: 0;
        width: 100%;
        padding: 1.25rem;
    }

    .container {
        padding: 0.5rem;
    }

    .dashboard-header-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .module-tabs {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }

    .module-tabs a {
        width: 100%;
        text-align: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #btn-download-pdf {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .resp-table-summary table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        font-size: 11px;
    }

    .resp-table-summary td,
    .resp-table-summary th {
        padding: 6px 4px;
        font-size: 10px;
        vertical-align: middle;
        word-break: break-word;
    }

    .resp-table-summary select {
        font-size: 11px;
    }

    .resp-table-summary tr td:first-child {
        width: 26%;
        min-width: 90px;
        font-size: 9px;
        line-height: 1.2;
    }

    .resp-table-summary tr td:not(:first-child) {
        width: 24.6%;
    }

    .resp-table-summary div[style*="justify-content: space-between"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    #cb_cicilan_selected {
        font-size: 12px;
        font-weight: bold;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .navbar.mobile-responsive {
        padding: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        height: auto;
    }

    .nav-brand {
        font-size: 1.1rem;
        white-space: nowrap;
        padding-bottom: 0.2rem;
    }

    .container.mobile-responsive {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .mobile-toggle {
        display: block;
        font-size: 1.5rem;
        margin-right: 15px;
        background: none;
        border: none;
        color: var(--accent);
    }

    .close-sidebar-btn {
        display: block;
    }

    .navbar {
        padding: 0.8rem 1rem;
        height: auto;
        min-height: 60px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .nav-left {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-bottom: 0.5rem;
    }

    .nav-user {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-user strong {
        display: block;
        font-size: 0.9rem;
        color: #333;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-separator {
        display: none;
    }

    .btn-logout {
        padding: 6px 10px;
        background-color: #fee2e2;
        border-radius: 6px;
    }

    .btn-logout span {
        display: none;
    }

    .btn-logout i {
        margin: 0;
        color: var(--danger);
        font-size: 1rem;
    }

    .section-header.mobile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    .header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 1rem;
        margin: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .alert-pending {
        flex-direction: column;
        align-items: flex-start;
    }

    .universal-filter {
        flex-wrap: wrap;
    }

    .filter-select-group {
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .btn-filter-only {
        flex-basis: 100%;
        justify-content: center;
    }

    .resp-table-detail table {
        min-width: 100%;
        font-size: 12px;
    }

    .cb-idr {
        display: none;
    }

    #tbl_cb_detail_body td,
    #tbl_cb_detail_body th {
        font-size: 11px;
        padding: 6px;
    }

    body.cb-show-a .cb-col-a {
        display: table-cell;
    }

    body.cb-show-b .cb-col-b {
        display: table-cell;
    }

    body.cb-show-c .cb-col-c {
        display: table-cell;
    }

    .cb-col-bulan {
        width: 15%;
    }

    .cb-col-awal,
    .cb-col-akhir {
        width: 30%;
    }

    .cb-col-a,
    .cb-col-b,
    .cb-col-c {
        width: 25%;
    }
}

@media (max-width: 700px) {

    .kpr-col-input,
    .kpr-hasil-wrapper {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
    }

    .kpr-col-konsumen {
        flex: 1 1 100%;
        width: 100%;
    }

    .kpr-col-gaji {
        flex: 1 1 100%;
        width: 100%;
    }

    .sim-wrapper .form-group {
        width: 100%;
        max-width: 100%;
    }

    .kpr-input-table {
        font-size: 12px;
    }

    .kpr-input-table td {
        padding: 4px 5px;
    }

    .kpr-input-table input,
    .kpr-input-table select {
        min-height: 30px;
        font-size: 12px;
    }

    .kpr-col-konsumen table,
    .kpr-col-gaji table {
        font-size: 12px;
    }

    .kpr-col-konsumen table td,
    .kpr-col-gaji table td {
        padding: 5px 6px;
    }
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }
}