/* ============================================================
   TXT Combiner Pro - Style CSS
   ============================================================ */

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

body {
    font-family: 'Courier New', Courier, monospace;
    background: #e8e8e8;
    padding: 20px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    border: 3px solid #222;
    padding: 20px 24px;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.1);
}

h1 {
    font-size: 24px;
    border-bottom: 3px solid #222;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

h1 small {
    font-size: 14px;
    background: #222;
    color: #fff;
    padding: 2px 14px;
    border-radius: 4px;
    font-weight: 400;
}

.subtitle {
    font-size: 14px;
    color: #555;
    margin: 4px 0 16px 0;
}

.status-bar {
    background: #e8e8e8;
    border: 2px solid #333;
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 14px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #333;
    background: #888;
    transition: background 0.2s;
}

.dot.idle { background: #10b981; animation: pulse-slow 1.8s ease-in-out infinite; }
.dot.running { background: #f59e0b; animation: pulse-fast 0.5s step-end infinite; }
.dot.done { background: #10b981; animation: none; }
.dot.error { background: #ef4444; animation: none; }

@keyframes pulse-slow { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@keyframes pulse-fast { 0%,100% { opacity:1; } 50% { opacity:0.2; } }

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #222;
    margin-bottom: 20px;
}

.tab-btn {
    background: #ddd;
    border: 2px solid #222;
    border-bottom: none;
    padding: 8px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
}

.tab-btn.active {
    background: #fff;
    position: relative;
    z-index: 1;
}

.tab-btn:hover { background: #eee; }

.tab-pane { display: none; padding: 10px 0; }
.tab-pane.active { display: block; }

.btn {
    background: #e0e0e0;
    border: 2px solid #333;
    padding: 6px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 3px 3px 0 #888;
    transition: 0.05s linear;
    margin: 2px 4px 2px 0;
}

.btn:hover { background: #ccc; box-shadow: 2px 2px 0 #888; transform: translate(1px, 1px); }
.btn:active { background: #bbb; box-shadow: 0 0 0 #888; transform: translate(3px, 3px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: 2px 2px 0 #888 !important; }

.btn-primary { background: #4f46e5; color: #fff; border-color: #2a1f9c; }
.btn-primary:hover { background: #3b35b0; }

.btn-success { background: #10b981; color: #fff; border-color: #0a7a55; }
.btn-success:hover { background: #0d9668; }

.btn-success-all { background: #059669; color: #fff; border-color: #047857; }
.btn-success-all:hover { background: #047857; }

.btn-danger { background: #ef4444; color: #fff; border-color: #a82424; }
.btn-danger:hover { background: #d12e2e; }

.btn-warning { background: #f59e0b; color: #fff; border-color: #b3740a; }
.btn-warning:hover { background: #d48a08; }

.btn-purple { background: #8b5cf6; color: #fff; border-color: #5b21b6; }
.btn-purple:hover { background: #7c3aed; }

.btn-info { background: #3b82f6; color: #fff; border-color: #1d4ed8; }
.btn-info:hover { background: #2563eb; }

.btn-gray { background: #6b7280; color: #fff; border-color: #4b5563; }
.btn-gray:hover { background: #4b5563; }

.btn-teal { background: #14b8a6; color: #fff; border-color: #0d9488; }
.btn-teal:hover { background: #0d9488; }

.drop-zone {
    border: 3px dashed #888;
    padding: 24px;
    text-align: center;
    margin: 12px 0 16px 0;
    background: #fafafa;
    cursor: pointer;
    transition: 0.2s;
}

.drop-zone:hover { background: #f0f0f0; border-color: #333; }
.drop-zone.dragover { background: #e0e7ff; border-color: #4f46e5; }

.file-list {
    max-height: 160px;
    overflow-y: auto;
    background: #f5f5f5;
    border: 1px solid #ccc;
    padding: 6px 10px;
    margin: 8px 0 12px 0;
    font-size: 13px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px dotted #ccc;
}

.file-item:last-child { border-bottom: none; }
.file-item .remove { color: #ef4444; cursor: pointer; font-weight: bold; margin-left: 12px; }
.file-item .remove:hover { color: #b91c1c; }

.output-area {
    background: #1a1a1a;
    color: #33ff33;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 12px 16px;
    border: 3px solid #333;
    min-height: 160px;
    max-height: 300px;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
    margin-top: 12px;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 6px 0;
    font-size: 14px;
}

.stats span {
    background: #eee;
    padding: 4px 12px;
    border: 1px solid #aaa;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 10px 0 14px 0;
    padding: 14px 16px;
    background: #f0f4ff;
    border: 2px solid #4f46e5;
    border-radius: 6px;
}

.filter-group label {
    font-weight: 600;
    font-size: 14px;
    min-width: 50px;
}

.filter-group select {
    padding: 6px 10px;
    font-family: inherit;
    font-size: 14px;
    border: 2px solid #888;
    background: #fff;
    min-width: 150px;
    max-width: 200px;
    flex: 1;
}

.filter-group select:focus { border-color: #4f46e5; outline: none; }
.filter-group select:disabled { opacity: 0.6; cursor: not-allowed; }

.filter-group .loading-text {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.filter-group .refresh-link {
    color: #4f46e5;
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
}

select option.processed {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    font-weight: 600;
}
select option.processed:hover { background-color: #a7f3d0 !important; }

select option.unprocessed {
    background-color: #ffffff;
    color: #374151;
}
select option.unprocessed:hover { background-color: #f3f4f6; }

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

.status-badge.processed { background: #d1fae5; color: #065f46; }
.status-badge.unprocessed { background: #f3f4f6; color: #6b7280; }

.path-preview-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    padding: 6px 12px;
    background: #f8f8f8;
    border-radius: 4px;
}

.path-preview-container code {
    background: #e8e8e8;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 13px;
    color: #222;
}

.footer {
    margin-top: 20px;
    border-top: 2px solid #ccc;
    padding-top: 12px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

.footer .highlight { color: #4f46e5; font-weight: 700; }

.install-btn {
    background: #222;
    color: #fff;
    border: 2px solid #333;
    padding: 4px 14px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 2px 2px 0 #888;
    display: none;
}

.install-btn.show { display: inline-block; }

@media (max-width: 600px) {
    .container { padding: 14px; }
    .tab-btn { font-size: 13px; padding: 6px 12px; }
    .btn { font-size: 12px; padding: 4px 10px; }
    .output-area { font-size: 11px; min-height: 120px; }
    .filter-group select { min-width: 100px; max-width: 150px; }
    .filter-group { padding: 10px 12px; }
}
/* Tambahan untuk tombol "Proses Semua Desa" */
.btn-success-all {
    background: #059669;
    color: #fff;
    border-color: #047857;
}
.btn-success-all:hover {
    background: #047857;
}
.btn-success-all:active {
    background: #065f46;
}
