* {
    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;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
} 

h1 {
    color: #333;
    margin-bottom: 10px;
}

h2 {
    color: #555;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

.upload-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

.btn-submit, .btn-generate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.2s;
}

.btn-submit:hover, .btn-generate:hover {
    transform: translateY(-2px);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.data-table th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
    position: sticky;
    top: 0;
}

.data-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.data-table tr:hover {
    background: #f5f5f5;
}

.data-table input[type="email"] {
    width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.btn-back {
    background: #6c757d;
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 5px;
    display: inline-block;
}

.info {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.info h3 {
    margin-bottom: 10px;
    color: #667eea;
}

.info ol {
    margin-left: 20px;
}

.info li {
    margin: 5px 0;
}

code {
    background: #f4f4f4;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table input[type="email"] {
        width: 150px;
    }
}

/* ===== TAB SWITCHER BNI / BCA ===== */
.bank-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    border-bottom: 3px solid #eee;
}

.bank-tab {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #aaa;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.bank-tab:hover {
    color: #555;
}

/* Warna tiap tab diatur lewat --tab-color di masing-masing tombol (lihat index.php),
   jadi nambah tab baru cukup set warnanya di HTML, tidak perlu nambah rule CSS lagi. */
.bank-tab.active {
    color: var(--tab-color, #667eea);
    border-bottom: 3px solid var(--tab-color, #667eea);
}

/* ===== BCA SPECIFIC STYLES ===== */
.btn-bca {
    background: linear-gradient(135deg, #005baa 0%, #0077cc 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: transform 0.2s;
}

.btn-bca:hover {
    transform: translateY(-2px);
}

.form-group input:focus {
    border-color: var(--focus-color, #667eea);
}

.bca-form .form-group input:focus {
    border-color: #005baa;
}

.info.bca-info {
    background: #e8f4ff;
}

.info.bca-info h3 {
    color: #005baa;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ===== MUTASI -> CSV VA SPECIFIC STYLES ===== */
.btn-mutasi {
    background: linear-gradient(135deg, #1b8a5a 0%, #159c66 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: transform 0.2s;
}

.btn-mutasi:hover {
    transform: translateY(-2px);
}

.mutasi-form .form-group input:focus {
    border-color: #1b8a5a;
}

.info.mutasi-info {
    background: #e9f7f0;
}

.info.mutasi-info h3 {
    color: #1b8a5a;
}

/* ===== CSV + BIAYA ADMIN SPECIFIC STYLES ===== */
.btn-csvadmin {
    background: linear-gradient(135deg, #b8791a 0%, #d99a2b 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: transform 0.2s;
}

.btn-csvadmin:hover {
    transform: translateY(-2px);
}

.csvadmin-form .form-group input:focus {
    border-color: #b8791a;
}

.info.csvadmin-info {
    background: #fbf1e2;
}

.info.csvadmin-info h3 {
    color: #b8791a;
}

/* ===== CONVERT CUSTOMER BRI SPECIFIC STYLES ===== */
.btn-convert {
    background: linear-gradient(135deg, #6f42c1 0%, #8a5cd6 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: transform 0.2s;
}

.btn-convert:hover {
    transform: translateY(-2px);
}

.convert-form .form-group input:focus,
.convert-form .form-group select:focus {
    outline: none;
    border-color: #6f42c1;
}

.info.convert-info {
    background: #f1ebfb;
}

.info.convert-info h3 {
    color: #6f42c1;
}

/* Select + tombol "Kelola" di sebelahnya */
.select-with-btn {
    display: flex;
    gap: 8px;
}

.select-with-btn select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
}

.btn-kelola {
    background: #f1ebfb;
    color: #6f42c1;
    border: 1px solid #d9c8f2;
    border-radius: 5px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.btn-kelola:hover {
    background: #e5d9f7;
}

.form-alert {
    padding: 10px 14px;
    border-radius: 5px;
    font-size: 13px;
    margin-bottom: 12px;
}

.form-alert.success {
    background: #e3f6e8;
    color: #1b8a5a;
}

.form-alert.error {
    background: #fde8e8;
    color: #c0392b;
}

/* ===== MODAL KELOLA GRUP / LABEL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 25px;
}

.modal-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.modal-box-header h3 {
    color: #6f42c1;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #999;
}

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

.crud-add-row {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.crud-add-row input {
    padding: 9px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.crud-add-row input:nth-child(1) {
    flex: 0 0 30%;
}

.crud-add-row input:nth-child(2) {
    flex: 1;
}

.crud-add-row button {
    background: #1b8a5a;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0 16px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

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

.crud-table th {
    background: #f1ebfb;
    color: #6f42c1;
    text-align: left;
    padding: 8px 10px;
}

.crud-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.crud-table input.edit-name {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.btn-xs {
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 4px;
}

.btn-xs.edit, .btn-xs.save {
    background: #eaf0fe;
    color: #667eea;
}

.btn-xs.delete {
    background: #fde8e8;
    color: #c0392b;
}

.hidden {
    display: none !important;
}

/* ===== SPINNER LOADING (dipakai pas proses convert) ===== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: -3px;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

button:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}