* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

header h1 {
    color: #333;
    margin-bottom: 5px;
    font-size: 28px;
}

header p {
    color: #666;
    font-size: 14px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="text"]:disabled,
input[type="date"]:disabled,
select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #999;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 500;
    cursor: pointer;
}

.button {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.button-primary {
    background: #667eea;
    color: white;
}

.button-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.button-secondary {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #ddd;
}

.button-secondary:hover {
    background: #e8e8e8;
}

.button-danger {
    background: #ff6b6b;
    color: white;
}

.button-danger:hover {
    background: #ff5252;
}

.button-success {
    background: #51cf66;
    color: white;
}

.button-success:hover {
    background: #40c057;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.button-group .button {
    flex: 1;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

.alert-success {
    background: #e8f5e9;
    color: #388e3c;
    border-left: 4px solid #388e3c;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #e65100;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-belum {
    background: #fff3e0;
    color: #e65100;
}

.status-sudah {
    background: #e8f5e9;
    color: #388e3c;
}

.data-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.data-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.data-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.data-field {
    padding: 15px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.data-field label {
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.helper-text {
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

.compare-wrap {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.compare-table th,
.compare-table td {
    border: 1px solid #e6e6e6;
    padding: 14px;
    vertical-align: top;
}

.compare-table thead th {
    background: #eef1ff;
    color: #1f2a44;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.compare-label {
    width: 200px;
    font-weight: 700;
    color: #333;
    background: #fafafa;
}

.compare-cell input,
.compare-cell select {
    width: 100%;
}

.compare-cell .checkbox-group {
    margin-top: 10px;
    margin-bottom: 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f6f7fb;
    border: 1px solid #e4e7f2;
}

.checkbox-group.compact label {
    font-size: 12px;
    color: #334155;
    font-weight: 600;
}

.compare-cell .verify-checkbox {
    width: 18px;
    height: 18px;
}

.compare-cell .verify-checkbox:checked {
    accent-color: #4c6fff;
}

.muted {
    color: #999;
}

.data-field p {
    font-size: 14px;
    color: #333;
    margin-top: 5px;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table thead {
    background: #f5f5f5;
}

table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

table tbody tr:hover {
    background: #f9f9f9;
}

.table-actions {
    display: flex;
    gap: 5px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit {
    background: #667eea;
    color: white;
}

.btn-edit:hover {
    background: #5568d3;
}

.btn-view {
    background: #64b5f6;
    color: white;
}

.btn-view:hover {
    background: #42a5f5;
}

.btn-delete {
    background: #ff6b6b;
    color: white;
}

.btn-delete:hover {
    background: #ff5252;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
}

.modal-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.modal-header h2 {
    color: #333;
    font-size: 20px;
}

.close-modal {
    float: right;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.close-modal:hover {
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    text-align: center;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        padding: 20px;
    }

    .data-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    header h1 {
        font-size: 22px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    table {
        font-size: 12px;
    }

    table th,
    table td {
        padding: 8px;
    }

    .table-actions {
        flex-direction: column;
    }

    .btn-small {
        width: 100%;
    }

    .compare-table thead {
        display: none;
    }

    .compare-table,
    .compare-table tbody,
    .compare-table tr,
    .compare-table td {
        display: block;
        width: 100%;
    }

    .compare-table tr {
        margin-bottom: 12px;
        border: 1px solid #e6e6e6;
        border-radius: 8px;
        overflow: hidden;
    }

    .compare-table td {
        border: none;
        border-bottom: 1px solid #eee;
        display: flex;
        gap: 12px;
        align-items: flex-start;
        padding: 12px 14px;
    }

    .compare-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #475569;
        min-width: 140px;
        flex-shrink: 0;
    }

    .compare-label {
        background: #eef1ff;
        color: #1f2a44;
    }

    .compare-table td.compare-label::before {
        content: none;
    }

    .compare-table td.compare-label {
        display: block;
        text-align: center;
        padding: 14px 16px;
    }

    .compare-label::before {
        content: '';
    }

    .compare-label {
        text-align: center;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        justify-content: center;
    }

    .compare-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .compare-cell .checkbox-group {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.hidden {
    display: none;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Copy Button Styles */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: #667eea;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.copy-btn:hover {
    background: #667eea;
    color: white;
}

.copy-btn.copied {
    background: #4caf50;
    color: white;
}

.copy-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.copy-btn:disabled:hover {
    background: none;
    color: #ccc;
}

/* Data field with copy button */
.data-field-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-field-value p {
    flex: 1;
    margin: 0;
}
