/* Layout Core */
body { font-family: 'Segoe UI', Tahoma, sans-serif; background: #f4f7f6; margin: 0; padding: 15px; color: #333; }
.main-container { max-width: 1300px; margin: auto; }

.grid-layout { 
    display: grid; 
    grid-template-columns: 500px 1fr; /* Kolom kiri tetap 500px, kanan sisa */
    gap: 15px; 
    align-items: start;
}

/* Komponen Card */
.card-box { 
    background: white; 
    padding: 12px; 
    border-radius: 8px; 
    border: 1px solid #ddd; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}
.full-height { min-height: 85vh; margin-bottom: 0; }

/* Flex Rows */
.row-flex { display: flex; gap: 8px; }
.row-flex input, .row-flex select { flex: 1; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; }

/* Buttons */
button { border: none; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 13px; transition: 0.2s; }
.btn-primary { background: #3498db; color: white; padding: 0 20px; }
.btn-success { background: #27ae60; color: white; padding: 0 25px; }
.btn-success-full { width: 100%; background: #27ae60; color: white; padding: 10px; margin-top: 8px; }
.btn-primary-full { width: 100%; background: #2980b9; color: white; padding: 12px; }
.btn-warning-full { width: 100%; background: #e67e22; color: white; padding: 12px; margin-top: 10px; }

/* Textarea */
textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #ccc; border-radius: 4px; resize: vertical; }
.title-small { margin: 0 0 10px 0; font-size: 13px; color: #7f8c8d; }

/* Ranking UI */
.ranking-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 10px; }
.badge-info { background: #34495e; color: white; padding: 4px 10px; border-radius: 20px; font-size: 11px; }

/* Mobile View */
.mobile-tabs { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background: white; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); }
.tab-btn { flex: 1; padding: 15px; background: #f8f9fa; border-top: 3px solid transparent; }
.tab-btn.active { border-top: 3px solid #3498db; color: #3498db; background: white; }

@media (max-width: 768px) {
    .grid-layout { display: block; }
    .left-column, .right-column { display: none; }
    .left-column.active, .right-column.active { display: block; }
    .mobile-tabs { display: flex; z-index: 100; }
    body { padding-bottom: 70px; }
}
.pairing-table { width: 100%; border-collapse: collapse; margin-top: 10px; background: white; }
.header-row { background: #34495e; color: white; font-size: 11px; }
.header-row th { padding: 10px; }

.row-pairing-unit td { border-bottom: 1px solid #eee; padding: 12px 8px; font-size: 13px; cursor: pointer; }

/* Highlight Pemenang */
.player-cell.winner { background: #dff9fb; color: #0984e3; }
.vs-cell.draw { background: #f1f2f6; font-weight: bold; }
.player-cell:hover { background: #f8f9fa; }

/* PopUp Styling */
.popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: flex; justify-content: center; align-items: center; z-index: 9999; }
.popup-content { background: white; padding: 25px; border-radius: 12px; max-width: 400px; width: 90%; text-align: center; }
.popup-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }

.pts-cell { background: #f9f9f9; font-weight: bold; width: 35px; color: #7f8c8d; }
.player-cell.winner { background: #dff9fb !important; color: #0984e3 !important; }
.vs-cell.draw { background: #f1f2f6 !important; font-weight: bold; }
.row-pairing-unit:hover { background: #fafafa; }

/* CSS PopUp */
.popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; z-index: 10000; }
.popup-content { background: white; padding: 30px; border-radius: 8px; text-align: center; max-width: 350px; width: 90%; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.btn-close-popup { background: #34495e; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; width: 100%; }
.btn-confirm-yes { background: #27ae60; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; flex: 1; }
.btn-confirm-no { background: #e74c3c; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; flex: 1; }

/* Tambahkan di bagian akhir style.css */
.author-badge {
    position: fixed;
    top: 10px;
    right: 15px;
    background: #34495e;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: none; /* Sembunyikan jika data belum dimuat */
}

/* Gaya untuk baris turnamen di halaman penuh */
.tournament-item {
    background: white;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tournament-item:hover {
    border-color: #3498db;
    background: #eef7fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* Tombol utama di dalam tab Manage */
.btn-primary-full {
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary-full:hover {
    background: #2980b9;
}