:root {
    --primary-color: #00573d;
    --secondary-color: #00835c;
    --background-color: #f4f7f6;
    --text-color: #333;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-active: #3498db;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Login Page */
.login-body {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    padding: 2rem;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.login-box h2 {
    margin-top: 0;
    color: var(--primary-color);
}

.login-box p {
    margin-bottom: 2rem;
    color: #777;
}

.input-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background-color: var(--secondary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-login:hover {
    background-color: var(--primary-color);
}

.login-footer {
    margin-top: 1.5rem;
}

.btn-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--primary-color);
}

.error-message {
    color: #e74c3c;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Dashboard Page */
.dashboard-body {
    background-color: var(--background-color);
}

.dashboard-container {
    display: flex;
}

.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    background-color: rgba(0,0,0,0.2);
}

.sidebar-header h3 {
    margin: 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.sidebar-nav li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-nav li.active a, .sidebar-nav li a:hover {
    background-color: var(--sidebar-active);
}

.sidebar-nav li.has-submenu > a::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: auto;
}

.sidebar-nav .submenu {
    list-style: none;
    padding: 0 0 0.5rem 1.5rem;
    background-color: rgba(0,0,0,0.15);
}

.sidebar-nav .submenu li a {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.sidebar-nav .submenu li.active a {
    background-color: var(--sidebar-active);
    border-left: 3px solid var(--sidebar-text);
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.main-header h2 {
    margin: 0;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
}

.content-area {
    padding: 2rem;
}

/* Summary Text Styles */
.dashboard-summary-text {
    background-color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    text-align: center;
}

.dashboard-summary-text p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.dashboard-summary-text strong {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.data-table-container {
    margin-top: 0;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

thead {
    border-bottom: 2px solid #eee;
}

th, td {
    padding: 1rem;
}

tbody tr {
    border-bottom: 1px solid #f4f4f4;
}

.status-pending {
    background-color: #f39c1220;
    color: #f39c12;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-weight: 500;
}

.status-confirmed {
    background-color: #2ecc7120;
    color: #2ecc71;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-weight: 500;
}

.btn-table {
    background-color: var(--sidebar-active);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Import Page Styles */
.import-container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.import-container h3 {
    margin-top: 0;
}

.input-file-dark {
    display: block;
    margin: 1.5rem 0;
}

.btn-import {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-import:hover {
    background-color: var(--secondary-color);
}

.log-container {
    margin-top: 2rem;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 8px;
    height: 200px;
    overflow-y: auto;
    font-family: monospace;
}

.log-container h4 {
    margin-top: 0;
    border-bottom: 1px solid #445a74;
    padding-bottom: 0.5rem;
}

pre#log-output {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Modal Styles */
.modal {
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content .close-button {
    color: #aaa;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.modal-content .konfirmasi-form label {
    color: #555;
}

.modal-content .konfirmasi-form input,
.modal-content .konfirmasi-form select {
    background-color: #f4f7f6;
    width: 100%; /* Ensure inputs take full width of their grid cell */
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: #333;
}

.modal-content .form-divider {
    border-top: 1px solid #eee;
}

.modal-content .form-actions {
    border-top: 1px solid #eee;
}

/* Specific styling for file input button within modal */
.modal-content .konfirmasi-form .input-file-dark::file-selector-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.modal-content .konfirmasi-form .input-file-dark::file-selector-button:hover {
    opacity: 0.85;
}

/* Specific styling for signature pad within modal */
.modal-content .signature-pad-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: white;
    height: 200px;
    margin-top: 0.5rem;
    max-width: 400px; /* Limit width */
    margin-left: auto; /* Center it */
    margin-right: auto; /* Center it */
}

.modal-content #edit-signature-canvas {
    width: 100%;
    height: 100%;
    display: block; /* Ensure it behaves as a block element */
}

.modal-content .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Responsive adjustments for forms inside modal */
@media (max-width: 768px) {
    .modal-content .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        min-height: auto;
        flex-direction: row;
        overflow-x: auto;
    }
    .sidebar-header { display: none; }
    .sidebar-nav ul { display: flex; }
}