/* === Global Style === */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

h1 {
    margin: 0;
    padding: 10px 0;
    text-align: center;
    font-size: 1.75rem;
}

h1 span {
    margin: 0;
    padding: 0;
    text-align: center;
    display: block;
    font-weight: 700;
}

.container {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* === Judul Umum === */
.judul {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
    text-align: center;
    color: #4f46e5;
}

/* === Form Kiriman (index.php) === */
.kiriman-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-text {
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    outline: none;
    transition: 0.2s;
}

.input-text:focus {
    border-color: #4f46e5;
}

/* Tombol Umum */
.btn-primary, .export-btn {
    padding: 12px;
    font-size: 16px;
    background-color: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover, .export-btn:hover {
    background-color: #4338ca;
}

/* Link Riwayat */
.link-riwayat {
    margin-top: 20px;
    text-align: center;
}

.link-riwayat a {
    text-decoration: none;
    color: #4f46e5;
    font-weight: bold;
    transition: color 0.2s;
}

.link-riwayat a:hover {
    color: #4338ca;
}

/* === Input Angka (input_angka.php) === */
.angka-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.angka-btn {
    padding: 10px 14px;
    background-color: #e0e7ff;
    color: #1e3a8a;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.angka-btn:hover {
    background-color: #c7d2fe;
}

.counter-info {
    text-align: center;
    margin-bottom: 25px;
    font-size: 18px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.delete-btn {
    padding: 0.25rem 1rem;
    background-color: #f43f5e;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.delete-btn:hover {
    background-color: #e11d48;
}

.delete-btn:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

.export-form {
    display: inline-block;
}

.export-btn {
    padding: 0.75rem 1.5rem;
    background-color: #3b82f6;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.3s;
}

.export-btn:hover {
    background-color: #2563eb;
}

.export-btn:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

/* === Riwayat (riwayat.php) === */
.riwayat-list {
    margin-top: 20px;
    list-style: none;
    padding: 0;
}

.riwayat-list li {
    background: #f0f4ff;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.riwayat-list a {
    text-decoration: none;
    color: #1e40af;
    font-weight: bold;
}

.riwayat-list a:hover {
    text-decoration: underline;
}

/* === Tabel Riwayat (riwayat.php) === */
.table-container {
    overflow-x: auto;
}

.riwayat-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.riwayat-table th, .riwayat-table td {
    border: 1px solid #dbeafe;
    padding: 12px 15px;
    text-align: left;
}

.riwayat-table th {
    background-color: #4f46e5;
    color: white;
    font-weight: 600;
}

.riwayat-table th a {
    color: white;
    text-decoration: none;
}

.riwayat-table th a:hover {
    text-decoration: underline;
}

.riwayat-table td {
    background-color: #f8fafc;
}

.download-link {
    color: #1e40af;
    text-decoration: none;
    font-weight: bold;
}

.download-link:hover {
    text-decoration: underline;
}

/* Tombol Kembali */
.back-button {
    margin-top: 25px;
    text-align: center;
}

.back-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #e0e7ff;
    color: #1e3a8a;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}

.back-link:hover {
    background-color: #c7d2fe;
}

/* === Dark Mode === */
body.dark-mode {
    background-color: #0f172a;
    color: #f1f5f9;
}

body.dark-mode .container,
body.dark-mode .table-container {
    background-color: #1e293b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .judul {
    color: #a5b4fc;
}

body.dark-mode h1 {
    color: #f1f5f9;
}

body.dark-mode h1 span {
    color: #a5b4fc;
}

body.dark-mode .riwayat-table th {
    background-color: #4f46e5;
    color: #ffffff;
}

body.dark-mode .riwayat-table th a {
    color: #ffffff;
}

body.dark-mode .riwayat-table td {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

body.dark-mode .download-link {
    color: #60a5fa;
}

body.dark-mode .download-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

body.dark-mode .back-link {
    background-color: #4f46e5;
    color: #ffffff;
}

body.dark-mode .back-link:hover {
    background-color: #6366f1;
    transform: translateX(-5px);
}

body.dark-mode .no-data-text {
    color: #94a3b8;
}

body.dark-mode .no-data-image {
    opacity: 0.9;
}

body.dark-mode .success-text {
    background-color: #166534;
    color: #f1f5f9;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Buat style tombol angka */
.angka-btn {
    padding: 0.75rem 1.25rem;
    background-color: #f0f0f0;
    border: 2px solid #ccc;
    border-radius: 0.5rem;
    margin: 0.25rem;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.angka-btn:hover {
    background-color: #d0d0d0;
}

/* Progress Bar container */
.progress-bar {
    width: 100%;
    height: 1.5rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

/* Progress Bar fill */
.progress-fill {
    height: 100%;
    width: 0;
    transition: width 0.5s ease-in-out;
}

/* Warna progress dinamis */
.bg-red-500 {
    background-color: #ef4444;
}

.bg-yellow-400 {
    background-color: #facc15;
}

.bg-green-500 {
    background-color: #22c55e;
}

/* Tambahan biar tampilannya lebih enak */
.input-wrapper {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Dark mode untuk .input-wrapper */
body.dark-mode .input-wrapper {
    background-color: #1e293b;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Tombol aktif terpilih */
.angka-btn.active {
    background-color: #4f46e5;
    color: #ffffff;
    border-color: #4338ca;
}

.judul {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.5rem;
}

.subjudul {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 1rem;
}

.back-section {
    margin-top: 1.5rem;
    text-align: center;
}

.back-link {
    color: #3b82f6;
    font-weight: bold;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Preview Section */
.preview-section {
    margin-top: 10px;
    text-align: left;
}

.preview-title {
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

.preview-list {
    text-align: center;
    border-radius: 1px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.no-data {
    color: #888;
    font-style: italic;
    text-align: center;
    margin: 0;
}

.success-text {
    font-size: 16px;
    margin: 10px 0;
    padding: 10px;
    background-color: #dcfce7;
    border-radius: 8px;
    text-align: center;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .container {
        padding: 15px;
        margin: 20px auto;
    }

    .angka-btn {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .btn-primary, .export-btn {
        font-size: 1rem;
        padding: 10px 15px;
    }

    .judul {
        font-size: 22px;
    }

    h1 {
        font-size: 1.25rem;
        text-align: center;
        padding: 8px 0;
    }

    h1 span {
        font-size: 1rem;
        text-align: center;
        display: inline;
    }

    .dark-mode-toggle, .switch {
        top: 10px;
        right: 10px;
        font-size: 1rem;
    }

    .switch {
        width: 40px;
        height: 22px;
    }

    .slider:before {
        height: 18px;
        width: 18px;
        left: 2px;
        bottom: 2px;
    }

    input:checked + .slider:before {
        transform: translateX(18px);
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-form {
        flex-direction: column;
        align-items: center;
    }

    .filter-input, .filter-btn, .reset-btn {
        width: 100%;
        max-width: 300px;
        margin-bottom: 10px;
    }
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    flex: 1;
    min-width: 150px;
}

.filter-btn, .reset-btn {
    padding: 8px 14px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
}

.reset-btn {
    background: #f43f5e;
}

.filter-btn:hover, .reset-btn:hover {
    opacity: 0.8;
}

.no-data-container {
    text-align: center;
    padding: 40px 0;
}

.no-data-image {
    width: 150px;
    opacity: 0.7;
    margin-bottom: 15px;
    animation: float 2s ease-in-out infinite;
}

.no-data-text {
    font-size: 18px;
    color: #666;
    margin: 10px 0;
}

/* Animasi gambar ngambang dikit */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 1rem;
    color: #333;
}

.input-field {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    margin-bottom: 20px;
}

.input-field:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 5px rgba(79, 70, 229, 0.5);
}

/* Custom Choices.js Styling */
.choices__inner {
    background-color: #fff;
    border: 2px solid #5c4dff;
    border-radius: 8px;
    min-height: 50px;
    font-size: 1rem;
    padding: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.choices__list--single {
    padding: 0;
}

.choices__item--selectable {
    padding: 10px 12px;
    cursor: pointer;
}

.choices__list--dropdown {
    width: 100%;
    max-width: 100%;
    border: 2px solid #5c4dff;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(39, 69, 238, 0.048);
    box-sizing: border-box;
}

.choices__item--choice {
    padding: 10px 12px;
    font-size: 1rem;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: #5c4dff;
    color: #fff;
}

.choices__list--dropdown .choices__item--selectable:hover {
    background-color: #5c4dff;
    color: #fff;
}

.choices__list--dropdown .choices__item--selectable:hover,
.choices__list[aria-expanded] .choices__item--selectable:hover {
    background-color: #5c4dff;
    color: #fff;
}

.choices__item--selectable.is-highlighted {
    background-color: #5c4dff;
    color: #fff;
}

.choices__item--selectable {
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* === Footer Umum === */
footer {
    text-align: center;
    font-size: 14px;
    padding: 20px 0;
    margin-top: 30px;
    color: #aaa;
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 12px;
    background-color: #e0e7ff;
    color: #1e3a8a;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}

.pagination a:hover {
    background-color: #c7d2fe;
}

.pagination span {
    font-size: 1rem;
    color: #333;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    flex: 1;
    min-width: 120px;
    font-size: 0.9rem;
}

body.dark-mode .filter-input {
    background-color: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

body.dark-mode .pagination a {
    background-color: #4f46e5;
    color: #ffffff;
}

body.dark-mode .pagination a:hover {
    background-color: #6366f1;
}

body.dark-mode .pagination span {
    color: #e2e8f0;
}

/* === Toggle Switch === */
.switch {
    position: absolute;
    top: 15px;
    right: 15px;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4f46e5;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 20px;
    text-align: center;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.change-password-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

.change-password-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

.logout-button {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.logout-button:hover {
    background-color: #c82333;
}

.logo {
    max-height: 40px;
    height: auto;
    width: auto;
}

/* Reset dan general */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body.login-page {
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Container Login */
.login-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #222; /* Diubah untuk pastiin kontras di light mode */
}

.login-container input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.login-container button {
    width: 100%;
    padding: 0.8rem;
    background: #0598ee;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #a64dfa;
}

body.dark .login-container {
    background: #222;
    color: #eee;
}

body.dark .login-container h2 {
    color: #fff; /* Pastiin teks keliatan di dark mode */
}

body.dark .login-container input {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

body.dark .login-container button {
    background: #666;
}

body.login-dark {
    background: #121212;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

body.login-dark .login-container h2 {
    color: #fff; /* Pastiin teks keliatan di dark mode */
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
    text-align: center;
    color: #fff;
}

.login-light .login-container h2 {
    color: #222; /* Pastiin teks kontras di light mode */
}

.login-light .login-card {
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.login-light .login-card h2 {
    color: #222; /* Fallback kalo login-card dipake */
}

.logo-login {
    width: 100px;
    margin-bottom: 20px;
}

.login-card input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    background: #333;
    color: white;
}

.login-light .login-card input {
    background: #f9f9f9;
    color: #000;
}

.login-card button {
    width: 100%;
    padding: 12px;
    background: #4caf50;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-card button:hover {
    background: #45a049;
}

.login-light .login-card button {
    background-color: #007bff;
    color: white;
}

.login-light .login-card button:hover {
    background-color: #0056b3;
}

/* animasi */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeInUp 0.6s ease;
}

/* === GLOBAL STYLE === */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

h1 {
    margin: 0;
    padding: 10px 0;
    text-align: center;
    font-size: 1.75rem;
}

h1 span {
    display: block;
    font-weight: 700;
}

/* === LAYOUT === */
.container {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.input-wrapper {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* === JUDUL === */
.judul {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
    text-align: center;
    color: #4f46e5;
}

/* === FORM KIRIMAN === */
.kiriman-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-text {
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    outline: none;
    transition: 0.2s;
}

.input-text:focus {
    border-color: #4f46e5;
}

/* === TOMBOL UMUM === */
.btn-primary,
.export-btn,
.delete-btn,
.back-link,
.angka-btn {
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary,
.export-btn {
    padding: 12px;
    background-color: #4f46e5;
    color: white;
}

.btn-primary:hover,
.export-btn:hover {
    background-color: #4338ca;
}

.export-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
}

.export-btn:disabled,
.delete-btn:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

.delete-btn {
    padding: 0.25rem 1rem;
    background-color: #f43f5e;
    color: #fff;
}

.delete-btn:hover {
    background-color: #e11d48;
}

.back-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #e0e7ff;
    color: #1e3a8a;
    text-decoration: none;
}

.back-link:hover {
    background-color: #c7d2fe;
}

/* === LINK RIWAYAT === */
.link-riwayat {
    margin-top: 20px;
    text-align: center;
}

.link-riwayat a {
    text-decoration: none;
    color: #4f46e5;
    font-weight: bold;
}

.link-riwayat a:hover {
    color: #4338ca;
}

/* === INPUT ANGKA === */
.angka-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.angka-btn {
    padding: 0.75rem 1.25rem;
    background-color: #f0f0f0;
    border: 2px solid #ccc;
    margin: 0.25rem;
    font-size: 1.25rem;
    background-color: #e0e7ff;
    color: #1e3a8a;
}

.angka-btn:hover {
    background-color: #c7d2fe;
}

.counter-info {
    text-align: center;
    margin-bottom: 25px;
    font-size: 18px;
}

/* === ACTION BUTTONS === */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* === RIWAYAT LIST === */
.riwayat-list {
    margin-top: 20px;
    list-style: none;
    padding: 0;
}

.riwayat-list li {
    background: #f0f4ff;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.riwayat-list a {
    text-decoration: none;
    color: #1e40af;
    font-weight: bold;
}

.riwayat-list a:hover {
    text-decoration: underline;
}

/* === TABEL RIWAYAT === */
.table-container {
    overflow-x: auto;
}

.riwayat-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.riwayat-table th,
.riwayat-table td {
    border: 1px solid #dbeafe;
    padding: 12px 15px;
    text-align: left;
}

.riwayat-table th {
    background-color: #4f46e5;
    color: white;
    font-weight: 600;
}

.riwayat-table th a {
    color: white;
    text-decoration: none;
}

.riwayat-table th a:hover {
    text-decoration: underline;
}

.riwayat-table td {
    background-color: #f8fafc;
}

.download-link {
    color: #1e40af;
    text-decoration: none;
    font-weight: bold;
}

.download-link:hover {
    text-decoration: underline;
}

/* === DARK MODE === */
body.dark-mode {
    background-color: #0f172a;
    color: #f1f5f9;
}

body.dark-mode .container,
body.dark-mode .table-container {
    background-color: #1e293b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .judul,
body.dark-mode h1 span {
    color: #a5b4fc;
}

body.dark-mode h1 {
    color: #f1f5f9;
}

body.dark-mode .riwayat-table th,
body.dark-mode .riwayat-table th a {
    background-color: #4f46e5;
    color: #ffffff;
}

body.dark-mode .riwayat-table td {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

body.dark-mode .download-link {
    color: #60a5fa;
}

body.dark-mode .download-link:hover {
    color: #93c5fd;
}

body.dark-mode .back-link {
    background-color: #4f46e5;
    color: #ffffff;
}

body.dark-mode .back-link:hover {
    background-color: #6366f1;
    transform: translateX(-5px);
}

body.dark-mode .no-data-text {
    color: #94a3b8;
}

body.dark-mode .no-data-image {
    opacity: 0.9;
}

body.dark-mode .success-text {
    background-color: #166534;
    color: #f1f5f9;
}

/* === DARK MODE TOGGLE === */
.dark-mode-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

/* === PROGRESS BAR === */
.progress-bar {
    width: 100%;
    height: 1.5rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    width: 0;
    transition: width 0.5s ease-in-out;
}

.bg-red-500 { background-color: #ef4444; }
.bg-yellow-400 { background-color: #facc15; }
.bg-green-500 { background-color: #22c55e; }

/* Reset dan General */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body.login-page {
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Container Login */
.login-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h2 {
    margin-bottom: 1.5rem;
    color: #222;
    font-size: 1.5rem;
    font-weight: bold;
}

.login-container input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.login-container button {
    width: 100%;
    padding: 0.8rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #4338ca;
}

/* Logo */
.logo-login {
    width: 100px;
    margin-bottom: 1rem;
}

/* Dark Mode */
body.login-dark {
    background: #121212;
}

body.login-dark .login-container {
    background: #1e1e1e;
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
}

body.login-dark .login-container h2 {
    color: #fff;
}

body.login-dark .login-container input {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

body.login-dark .login-container button {
    background: #6366f1;
}

body.login-dark .login-container button:hover {
    background: #4f46e5;
}

/* Light Mode */
body.login-light .login-container {
    background: #fff;
}

body.login-light .login-container h2 {
    color: #222; /* Pastiin teks Login kontras */
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Animasi */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeInUp 0.6s ease;
}

/* Responsive */
@media (max-width: 600px) {
    .login-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .login-container h2 {
        font-size: 1.25rem;
    }

    .dark-mode-toggle {
        top: 10px;
        right: 10px;
        font-size: 1rem;
    }
}

/* Reset dan General */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body.login-page {
    background: #f1f1f1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #fff;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    max-height: 40px;
    width: auto;
}

h1 {
    font-size: 1.5rem;
    color: #222;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Container Login */
.login-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 2rem auto;
}

.login-container h2 {
    margin-bottom: 1.5rem;
    color: #222;
    font-size: 1.5rem;
    font-weight: bold;
}

.login-container input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.login-container button {
    width: 100%;
    padding: 0.8rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #4338ca;
}

/* Dark Mode */
body.dark-mode {
    background: #121212;
}

body.dark-mode .header {
    background: #1e1e1e;
}

body.dark-mode h1 {
    color: #fff;
}

body.dark-mode .login-container {
    background: #1e1e1e;
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
}

body.dark-mode .login-container h2 {
    color: #fff;
}

body.dark-mode .login-container input {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

body.dark-mode .login-container button {
    background: #6366f1;
}

body.dark-mode .login-container button:hover {
    background: #4f46e5;
}

body.dark-mode footer {
    color: #aaa;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Footer */
footer {
    text-align: center;
    font-size: 14px;
    padding: 20px 0;
    margin-top: auto;
    color: #666;
}

/* Animasi */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeInUp 0.6s ease;
}

/* Responsive */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 10px;
    }

    .login-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .login-container h2 {
        font-size: 1.25rem;
    }

    .dark-mode-toggle {
        font-size: 1rem;
    }
}

/* Reset dan General */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body.login-page {
    background: #f1f1f1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #fff;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-title h1 {
    text-align: center;
    flex-grow: 1; /* Biar h1 centered di sisa ruang */
}

.logo {
    max-height: 40px;
    width: auto;
}

h1 {
    font-size: 1.5rem;
    color: #222;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Container Login */
.login-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 2rem auto;
}

.login-container h2 {
    margin-bottom: 1.5rem;
    color: #222;
    font-size: 1.5rem;
    font-weight: bold;
}

.login-container input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.login-container button {
    width: 100;
    padding: 0.8rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #4338ca;
}

/* Dark Mode */
body.dark-mode {
    background: #121212;
}

body.dark-mode .header {
    background: #1e1e1e;
}

body.dark-mode h1 {
    color: #fff;
}

body.dark-mode .login-container {
    background: #1e1e1e;
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
}

body.dark-mode .login-container h2 {
    color: #fff;
}

body.dark-mode .login-container input {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

body.dark-mode .login-container button {
    background: #6366f1;
}

body.dark-mode .login-container button:hover {
    background: #4f46e5;
}

body.dark-mode footer {
    color: #aaa;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Footer */
header {
    text-align: center;
    font-size: 14px;
    padding: 20px 0;
    margin-top: auto;
    color: #666;
}

/* Animasi */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeInUp 0.6s ease;
}

/* Responsive */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 10px;
    }

    .login-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .login-container h2 {
        font-size: 1.25rem;
    }

    .dark-mode-toggle {
        font-size: 1rem;
    }
}

/* === Global Style === */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

.riwayat-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.riwayat-table th,
.riwayat-table td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  text-align: left;
}

.riwayat-table th {
  background-color: #f3f4f6;
  font-weight: 600;
  color: #1f2937;
}

.riwayat-table tr:nth-child(even) {
  background-color: #f9fafb;
}

.riwayat-table tr:hover {
  background-color: #f1f5f9;
}

.select2-container--default .select2-selection--single {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem;
  background-color: #ffffff;
  height: 2.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 2.5rem;
}

.select2-container {
  width: 100% !important;
}

.select2-dropdown {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: #ffffff;
}

.select2-results__option:hover {
  background-color: #f1f5f9;
}

.sub-title {
  display: block;
  font-size: 1.125rem; /* text-lg */
  color: #4b5563; /* text-gray-600 */
  margin-top: -0.5rem; /* sesuaikan jarak */
}
.riwayat-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.riwayat-table th,
.riwayat-table td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  text-align: left;
}

.riwayat-table th {
  background-color: #f3f4f6;
  font-weight: 600;
  color: #1f2937;
}

.riwayat-table tr:nth-child(even) {
  background-color: #f9fafb;
}

.riwayat-table tr:hover {
  background-color: #f1f5f9;
}

.select2-container--default .select2-selection--single {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem;
  background-color: #ffffff;
  height: 2.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 2.5rem;
}

.select2-container {
  width: 100% !important;
}

.select2-dropdown {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: #ffffff;
}

.select2-results__option:hover {
  background-color: #f1f5f9;
}

.sub-title {
  display: block;
  font-size: 1.125rem; /* text-lg */
  color: #4b5563; /* text-gray-600 */
  margin-top: -0.5rem; /* sesuaikan jarak */
}

.pagination {
  font-size: 0.875rem; /* text-sm */
  color: #1f2937; /* text-gray-800 */
}

.pagination a, .pagination span {
  padding: 0.5rem;
}

/* === Riwayat (riwayat.php) === */
.riwayat-list {
    margin-top: 20px;
    list-style: none;
    padding: 0;
}

.riwayat-list li {
    background: #f0f4ff;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.riwayat-list a {
    text-decoration: none;
    color: #1e40af;
    font-weight: bold;
}

.riwayat-list a:hover {
    text-decoration: underline;
}

/* === Tabel Riwayat (riwayat.php) === */
.table-container {
    overflow-x: auto;
}

.riwayat-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.riwayat-table th, .riwayat-table td {
    border: 1px solid #dbeafe;
    padding: 12px 15px;
    text-align: left;
}

.riwayat-table th {
    background-color: #4f46e5;
    color: white;
    font-weight: 600;
}

.riwayat-table td {
    background-color: #f8fafc;
}

/* Select2 */
.select2-container--default .select2-selection--single {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem;
  background-color: #ffffff;
  height: 2.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 2.5rem;
}

.select2-container {
  width: 100% !important;
}

.select2-dropdown {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: #ffffff;
}

.select2-results__option:hover {
  background-color: #f1f5f9;
}

/* Sub-title */
.sub-title {
  display: block;
  font-size: 1.125rem; /* text-lg */
  color: #4b5563; /* text-gray-600 */
  margin-top: -0.5rem;
}

/* Filter Form */
.filter-form {
  margin-bottom: 1.5rem;
}

.filter-form .flex {
  gap: 1rem;
}

.filter-form label {
  font-size: 0.875rem;
  color: #1f2937;
}

.filter-form input,
.filter-form select {
  font-size: 0.875rem;
}

/* Pagination */
.pagination {
  font-size: 0.875rem; /* text-sm */
  color: #1f2937; /* text-gray-800 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
}

.pagination a:hover {
  background-color: #e5e7eb;
}

/* Dropdown Limit */
.limit-select {
  width: 6rem;
}

.logo {
    max-height: 60px;
    height: auto;
    width: auto;
}
